]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1681 v7.4.1681
authorBram Moolenaar <Bram@vim.org>
Mon, 28 Mar 2016 20:44:50 +0000 (22:44 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 28 Mar 2016 20:44:50 +0000 (22:44 +0200)
Problem:    Coverity warns for fixed size buffer length (false positive).
Solution:   Add a check for the name length.

src/eval.c
src/version.c

index cd7ce25cd99e0a11494355ece25903b052adca5b..1516fe596c8c75a78eec1ee1f9cf78c841289813 100644 (file)
@@ -933,6 +933,11 @@ eval_init(void)
     for (i = 0; i < VV_LEN; ++i)
     {
        p = &vimvars[i];
+       if (STRLEN(p->vv_name) > 16)
+       {
+           EMSG("INTERNAL: name too long, increase size of dictitem16_T");
+           getout(1);
+       }
        STRCPY(p->vv_di.di_key, p->vv_name);
        if (p->vv_flags & VV_RO)
            p->vv_di.di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
index 4778bfecdc65f679249b6f44c67cb7e187998305..26928e95b13e2f1d3ead319e2a3653ca43fb3af3 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1681,
 /**/
     1680,
 /**/