format string did not match variable size -> stack corruption

--HG--
extra : convert_revision : b7c5aaa9d1f1242cfe337d6555e476f622a2aa6d
This commit is contained in:
Ali Saidi 2005-09-12 16:09:51 -04:00
parent 94bf249af4
commit 332f184824

View file

@ -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);