summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2005-09-12 16:09:51 -0400
committerAli Saidi <saidi@eecs.umich.edu>2005-09-12 16:09:51 -0400
commit332f1848240f2c557476b21e993d8b3910f32db5 (patch)
treed5d9b4a02ea40ac3457da32722a380af30d248b6 /base
parent94bf249af43f5f6fea1bbfd2c68d19de3685d93a (diff)
downloadgem5-332f1848240f2c557476b21e993d8b3910f32db5.tar.xz
format string did not match variable size -> stack corruption
--HG-- extra : convert_revision : b7c5aaa9d1f1242cfe337d6555e476f622a2aa6d
Diffstat (limited to 'base')
-rw-r--r--base/hostinfo.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/hostinfo.cc b/base/hostinfo.cc
index df9bd0d29..d15e3ddc1 100644
--- a/base/hostinfo.cc
+++ b/base/hostinfo.cc
@@ -70,7 +70,7 @@ procInfo(char *filename, char *target)
while (fp && !feof(fp) && !done) {
if (fgets(line, 80, fp)) {
if (strncmp(line, target, strlen(target)) == 0) {
- snprintf(format, sizeof(format), "%s %%lld", target);
+ snprintf(format, sizeof(format), "%s %%ld", target);
sscanf(line, format, &usage);
fclose(fp);