]> granicus.if.org Git - vim/commitdiff
patch 8.2.2438: out of bounds compiler warning v8.2.2438
authorBram Moolenaar <Bram@vim.org>
Sun, 31 Jan 2021 13:46:00 +0000 (14:46 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 31 Jan 2021 13:46:00 +0000 (14:46 +0100)
Problem:    Out of bounds compiler warning.
Solution:   Increase the size of uf_name.

src/structs.h
src/version.c

index bd59656b7cbf0031202884b0feeb5ff0a1d64e5b..6cdfb4fc5c6ea6037c676dae7d805b8165cf3041 100644 (file)
@@ -1649,8 +1649,8 @@ typedef struct
 
     char_u     *uf_name_exp;   // if "uf_name[]" starts with SNR the name with
                                // "<SNR>" as a string, otherwise NULL
-    char_u     uf_name[1];     // name of function (actually longer); can
-                               // start with <SNR>123_ (<SNR> is K_SPECIAL
+    char_u     uf_name[4];     // name of function (actual size equals name);
+                               // can start with <SNR>123_ (<SNR> is K_SPECIAL
                                // KS_EXTRA KE_SNR)
 } ufunc_T;
 
index 903f3fd604cbaa160def5306127ac7fdb0e5cbfd..fe5d219360d64b2e120741bed50b95b082d7c076 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2438,
 /**/
     2437,
 /**/