projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a76788
)
util: Fix stack corruption in the m5 util
author
Andreas Sandberg
<Andreas.Sandberg@ARM.com>
Mon, 7 Jan 2013 21:56:37 +0000
(16:56 -0500)
committer
Andreas Sandberg
<Andreas.Sandberg@ARM.com>
Mon, 7 Jan 2013 21:56:37 +0000
(16:56 -0500)
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.
util/m5/m5.c
patch
|
blob
|
history
diff --git
a/util/m5/m5.c
b/util/m5/m5.c
index 53ac0fba8a217983cd0c0b55333ff994975e6d68..e9fe8f1f32f05a9298d1d3229919bbb80ee40edf 100644
(file)
--- 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]);
}