From 35be32b7ea9748cd061e01d5329e95dfafa4a2e1 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 16:56:37 -0500 Subject: 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. --- util/m5/m5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') 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]); } -- cgit v1.2.3