From: Bing Bu Cao Date: Tue, 21 Jan 2014 05:21:49 +0000 (+0800) Subject: Fix buffer size in linuxNodeGetCPUstats X-Git-Tag: v1.2.2-rc1~234 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2310e631cd05b1f5b7421c43ca46f377fd8aa87a;p=thirdparty%2Flibvirt.git Fix buffer size in linuxNodeGetCPUstats 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 --- 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 */