]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/util: handle long lines in /proc/cpuinfo 27707/head
authorSage Weil <sage@redhat.com>
Mon, 22 Apr 2019 17:51:41 +0000 (12:51 -0500)
committerSage Weil <sage@redhat.com>
Mon, 22 Apr 2019 17:51:41 +0000 (12:51 -0500)
Fixes: http://tracker.ceph.com/issues/38296
Signed-off-by: Sage Weil <sage@redhat.com>
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)