projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94bf249
)
format string did not match variable size -> stack corruption
author
Ali Saidi
<saidi@eecs.umich.edu>
Mon, 12 Sep 2005 20:09:51 +0000
(16:09 -0400)
committer
Ali Saidi
<saidi@eecs.umich.edu>
Mon, 12 Sep 2005 20:09:51 +0000
(16:09 -0400)
--HG--
extra : convert_revision :
b7c5aaa9d1f1242cfe337d6555e476f622a2aa6d
base/hostinfo.cc
patch
|
blob
|
history
diff --git
a/base/hostinfo.cc
b/base/hostinfo.cc
index df9bd0d29c4d753bb9452b7bb8000957a3663d35..d15e3ddc13d657d9360562064f9b4562f449851a 100644
(file)
--- 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 %%l
l
d", target);
+ snprintf(format, sizeof(format), "%s %%ld", target);
sscanf(line, format, &usage);
fclose(fp);