Honggang Li e06f38
From b947fc631d499fa6e041b6c460320bcd253f4671 Mon Sep 17 00:00:00 2001
Honggang Li e06f38
From: Honggang Li <honli@redhat.com>
Honggang Li e06f38
Date: Wed, 22 Feb 2017 01:42:25 -0500
Honggang Li e06f38
Subject: [PATCH] Extend buffer for a few arrays
Honggang Li e06f38
Honggang Li e06f38
Signed-off-by: Honggang Li <honli@redhat.com>
Honggang Li e06f38
---
Honggang Li e06f38
 mtcr_ul/mtcr_ul_com.c | 8 ++++----
Honggang Li e06f38
 1 file changed, 4 insertions(+), 4 deletions(-)
Honggang Li e06f38
Honggang Li e06f38
diff --git a/mtcr_ul/mtcr_ul_com.c b/mtcr_ul/mtcr_ul_com.c
Honggang Li e06f38
index 50a663f..1335b43 100644
Honggang Li e06f38
--- a/mtcr_ul/mtcr_ul_com.c
Honggang Li e06f38
+++ b/mtcr_ul/mtcr_ul_com.c
Honggang Li e06f38
@@ -1353,7 +1353,7 @@ int mdevices_v_ul(char *buf, int len, int mask, int verbosity)
Honggang Li e06f38
     }
Honggang Li e06f38
 
Honggang Li e06f38
     char inbuf[64];
Honggang Li e06f38
-    char fname[64];
Honggang Li e06f38
+    char fname[300];
Honggang Li e06f38
 
Honggang Li e06f38
     d = opendir("/sys/bus/pci/devices");
Honggang Li e06f38
     if (d == NULL) {
Honggang Li e06f38
@@ -1369,7 +1369,7 @@ int mdevices_v_ul(char *buf, int len, int mask, int verbosity)
Honggang Li e06f38
             continue;
Honggang Li e06f38
         } else if (sz > 4 && strcmp(dir->d_name + sz - 4, "00.0") && !verbosity) {
Honggang Li e06f38
             // Skip virtual functions
Honggang Li e06f38
-            char physfn[64];
Honggang Li e06f38
+            char physfn[300];
Honggang Li e06f38
             DIR* physfndir;
Honggang Li e06f38
             sprintf(physfn, "/sys/bus/pci/devices/%s/physfn", dir->d_name);
Honggang Li e06f38
             if ((physfndir = opendir(physfn)) != NULL) {
Honggang Li e06f38
@@ -1993,9 +1993,9 @@ int mclose_ul(mfile *mf)
Honggang Li e06f38
     return 0;
Honggang Li e06f38
 }
Honggang Li e06f38
 
Honggang Li e06f38
-#define IBDR_MAX_NAME_SIZE 128
Honggang Li e06f38
+#define IBDR_MAX_NAME_SIZE 300
Honggang Li e06f38
 #define BDF_NAME_SIZE 12
Honggang Li e06f38
-#define DEV_DIR_MAX_SIZE 128
Honggang Li e06f38
+#define DEV_DIR_MAX_SIZE 300
Honggang Li e06f38
 static
Honggang Li e06f38
 int get_inband_dev_from_pci(char* inband_dev, char* pci_dev)
Honggang Li e06f38
 {
Honggang Li e06f38
-- 
Honggang Li e06f38
2.7.4
Honggang Li e06f38