]> granicus.if.org Git - vim/commitdiff
patch 8.2.1275: Vim9: compiler warning for buffer size v8.2.1275
authorBram Moolenaar <Bram@vim.org>
Thu, 23 Jul 2020 12:39:47 +0000 (14:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 23 Jul 2020 12:39:47 +0000 (14:39 +0200)
Problem:    Vim9: compiler warning for buffer size.
Solution:   Change the offset from 10 to 15. (Dominique PellĂ©, closes #6518)

src/version.c
src/vim9script.c

index 82b5780b4e52fb09ede58b8f6850aa14fcd3f551..3489c45bac076ff369d017bf08c8f54771896c74 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1275,
 /**/
     1274,
 /**/
index 24953cd60a1ebebd0fc990a2989df65fd5249f0e..34c3dabcf0d24ba6238f9a72665781be957fbcc2 100644 (file)
@@ -198,11 +198,11 @@ find_exported(
        char_u  *funcname;
 
        // it could be a user function.
-       if (STRLEN(name) < sizeof(buffer) - 10)
+       if (STRLEN(name) < sizeof(buffer) - 15)
            funcname = buffer;
        else
        {
-           funcname = alloc(STRLEN(name) + 10);
+           funcname = alloc(STRLEN(name) + 15);
            if (funcname == NULL)
                return -1;
        }