diff options
-rw-r--r-- | vl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -953,8 +953,8 @@ static void numa_add(const char *optarg) node_mem[nodenr] = 0; } else { int64_t sval; - sval = strtosz(option, NULL); - if (sval < 0) { + sval = strtosz(option, &endptr); + if (sval < 0 || *endptr) { fprintf(stderr, "qemu: invalid numa mem size: %s\n", optarg); exit(1); } |