]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/util: handle long lines in /proc/cpuinfo 28141/head
authorSage Weil <sage@redhat.com>
Mon, 22 Apr 2019 17:51:41 +0000 (12:51 -0500)
committerPrashant D <pdhange@redhat.com>
Thu, 16 May 2019 00:17:42 +0000 (20:17 -0400)
Fixes: http://tracker.ceph.com/issues/38296
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit b02e81935c877eff4929c8aad714b0015db45201)

src/common/util.cc

index fea63e955117f8eee0ececeeae4cffeb860b27df..dc79648b7a049f2fcce854872970bb47bd94d351 100644 (file)
@@ -268,7 +268,7 @@ void collect_sys_info(map<string, string> *m, CephContext *cct)
   // processor
   f = fopen(PROCPREFIX "/proc/cpuinfo", "r");
   if (f) {
-    char buf[100];
+    char buf[1024];
     while (!feof(f)) {
       char *line = fgets(buf, sizeof(buf), f);
       if (!line)