format string did not match variable size -> stack corruption
--HG-- extra : convert_revision : b7c5aaa9d1f1242cfe337d6555e476f622a2aa6d
This commit is contained in:
parent
94bf249af4
commit
332f184824
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue