From b2ad21990a1dd1bc5b8a58f0ac851d8ca304885b Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Mon, 14 Jul 2014 19:07:25 +0200 Subject: [PATCH] library: fixing buffer sizes in sysinfo.c --- proc/sysinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proc/sysinfo.c b/proc/sysinfo.c index e3e2ca5b..92814df2 100644 --- a/proc/sysinfo.c +++ b/proc/sysinfo.c @@ -57,7 +57,8 @@ static int vminfo_fd = -1; // As of 2.6.24 /proc/meminfo seems to need 888 on 64-bit, // and would need 1258 if the obsolete fields were there. -static char buf[2048]; +// As of 3.13 /proc/vmstat needs 2623 on 64-bit. +static char buf[8192]; /* This macro opens filename only if necessary and seeks to 0 so * that successive calls to the functions are more efficient. @@ -748,7 +749,7 @@ static unsigned long vm_pginodesteal; // static unsigned long vm_slabs_scanned; // void vminfo(void){ - char namebuf[16]; /* big enough to hold any row name */ + char namebuf[32]; /* big enough to hold any row name */ vm_table_struct findme = { namebuf, NULL}; vm_table_struct *found; char *head;