]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/util: handle long lines in /proc/cpuinfo 28206/head
authorSage Weil <sage@redhat.com>
Mon, 22 Apr 2019 17:51:41 +0000 (12:51 -0500)
committerPrashant D <pdhange@redhat.com>
Wed, 22 May 2019 00:14:30 +0000 (20:14 -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 c07a493872e8bf58732778ac7b8e5eedbb250df9..ea5ecf42703bd1a0c880289f8f69a1cc44b5525f 100644 (file)
@@ -208,7 +208,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)