]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/util: handle long lines in /proc/cpuinfo 32349/head
authorSage Weil <sage@redhat.com>
Mon, 22 Apr 2019 17:51:41 +0000 (12:51 -0500)
committerNathan Cutler <ncutler@suse.com>
Thu, 19 Dec 2019 14:22:08 +0000 (15:22 +0100)
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 cf345954c11305fad1663e588b8a4c9125965896..996fc738d6eca9ce987b298a090c50308c3bef54 100644 (file)
@@ -173,7 +173,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)