From: Ali Saidi Date: Mon, 12 Sep 2005 20:09:51 +0000 (-0400) Subject: format string did not match variable size -> stack corruption X-Git-Tag: m5_1.1~22^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=332f1848240f2c557476b21e993d8b3910f32db5;p=gem5.git format string did not match variable size -> stack corruption --HG-- extra : convert_revision : b7c5aaa9d1f1242cfe337d6555e476f622a2aa6d --- 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);