util: Fix stack corruption in the m5 util

The number of arguments specified when calling parse_int_args() in
do_exit() is incorrect. This leads to stack corruption since it causes
writes past the end of the ints array.
This commit is contained in:
Andreas Sandberg 2013-01-07 16:56:37 -05:00
parent 8a767885d6
commit 35be32b7ea

View file

@ -130,7 +130,7 @@ do_exit(int argc, char *argv[])
usage();
uint64_t ints[1];
parse_int_args(argc, argv, ints, 2);
parse_int_args(argc, argv, ints, 1);
m5_exit(ints[0]);
}