summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index b9146cf..a50842b 100644
--- a/vl.c
+++ b/vl.c
@@ -2535,9 +2535,10 @@ int main(int argc, char **argv, char **envp)
break;
case QEMU_OPTION_m: {
int64_t value;
+ char *end;
- value = strtosz(optarg, NULL);
- if (value < 0) {
+ value = strtosz(optarg, &end);
+ if (value < 0 || *end) {
fprintf(stderr, "qemu: invalid ram size: %s\n", optarg);
exit(1);
}
OpenPOWER on IntegriCloud