From 531aef2e1b2c5ca97bc2936c108a6fa20b60de93 Mon Sep 17 00:00:00 2001 From: Boris Fiuczynski Date: Wed, 17 Dec 2014 16:47:11 +0100 Subject: [PATCH] Buffer size too small when reading sysinfo On a system with 160 CPUs the /proc/cpuinfo size grows beyond the currently set limit of 10KB causing an internal error. This patch increases the buffer size to 1MB. Signed-off-by: Boris Fiuczynski --- src/util/virsysinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index d644dbc8af..4edce66a6b 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -50,7 +50,7 @@ static const char *sysinfoCpuinfo = "/proc/cpuinfo"; #define SYSINFO_SMBIOS_DECODER sysinfoDmidecode #define SYSINFO sysinfoSysinfo #define CPUINFO sysinfoCpuinfo -#define CPUINFO_FILE_LEN (10*1024) /* 10KB limit for /proc/cpuinfo file */ +#define CPUINFO_FILE_LEN (1024*1024) /* 1MB limit for /proc/cpuinfo file */ /* only to be used test programs, therefore not in sysinfo.h */ extern void virSysinfoSetup(const char *dmidecode, const char *sysinfo,