diff options
Diffstat (limited to 'qemu-io-cmds.c')
-rw-r--r-- | qemu-io-cmds.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 01a6dc6fbc..7ac1576d4c 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -138,12 +138,15 @@ static char **breakline(char *input, int *count) static int64_t cvtnum(const char *s) { int err; - int64_t value; + uint64_t value; err = qemu_strtosz(s, NULL, &value); if (err < 0) { return err; } + if (value > INT64_MAX) { + return -ERANGE; + } return value; } |