kallsyms: make KSYM_NAME_LEN include space for trailing '\0'
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / scripts / kallsyms.c
index 8b809b264d18356ead4dc3012a2a091e3f423cb5..10b006694e5de8751d68341ae0eb58fa37e0b196 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h>
 #include <ctype.h>
 
-#define KSYM_NAME_LEN          127
+#define KSYM_NAME_LEN          128
 
 
 struct sym_entry {
@@ -254,7 +254,7 @@ static void write_src(void)
        unsigned int i, k, off;
        unsigned int best_idx[256];
        unsigned int *markers;
-       char buf[KSYM_NAME_LEN+1];
+       char buf[KSYM_NAME_LEN];
 
        printf("#include <asm/types.h>\n");
        printf("#if BITS_PER_LONG == 64\n");