aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 4955c2972d..d6f6422de4 100644
--- a/vl.c
+++ b/vl.c
@@ -1267,7 +1267,10 @@ static void numa_add(const char *optarg)
if (get_param_value(option, 128, "nodeid", optarg) == 0) {
nodenr = nb_numa_nodes;
} else {
- nodenr = strtoull(option, NULL, 10);
+ if (parse_uint_full(option, &nodenr, 10) < 0) {
+ fprintf(stderr, "qemu: Invalid NUMA nodeid: %s\n", option);
+ exit(1);
+ }
}
if (nodenr >= MAX_NODES) {