From 332f1848240f2c557476b21e993d8b3910f32db5 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 12 Sep 2005 16:09:51 -0400 Subject: [PATCH] format string did not match variable size -> stack corruption --HG-- extra : convert_revision : b7c5aaa9d1f1242cfe337d6555e476f622a2aa6d --- base/hostinfo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);