diff options
author | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-01-07 16:56:37 -0500 |
---|---|---|
committer | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-01-07 16:56:37 -0500 |
commit | 35be32b7ea9748cd061e01d5329e95dfafa4a2e1 (patch) | |
tree | 12ced7852f98075b1b87b91c7c01abca0933a0ad /util | |
parent | 8a767885d658e4c52e1f81932426233aa1975ed8 (diff) | |
download | gem5-35be32b7ea9748cd061e01d5329e95dfafa4a2e1.tar.xz |
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.
Diffstat (limited to 'util')
-rw-r--r-- | util/m5/m5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/m5/m5.c b/util/m5/m5.c index 53ac0fba8..e9fe8f1f3 100644 --- a/util/m5/m5.c +++ b/util/m5/m5.c @@ -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]); } |