From 2310e631cd05b1f5b7421c43ca46f377fd8aa87a Mon Sep 17 00:00:00 2001 From: Bing Bu Cao Date: Tue, 21 Jan 2014 13:21:49 +0800 Subject: [PATCH] Fix buffer size in linuxNodeGetCPUstats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 94f8205 added a space to the string but didn't change the buffer size. Signed-off-by: Bing Bu Cao Signed-off-by: Ján Tomko --- src/nodeinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index cba2fc147c..cf6d29b989 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -691,7 +691,7 @@ linuxNodeGetCPUStats(FILE *procstat, char line[1024]; unsigned long long usr, ni, sys, idle, iowait; unsigned long long irq, softirq, steal, guest, guest_nice; - char cpu_header[3 + INT_BUFSIZE_BOUND(cpuNum)]; + char cpu_header[4 + INT_BUFSIZE_BOUND(cpuNum)]; if ((*nparams) == 0) { /* Current number of cpu stats supported by linux */ -- GitLab