]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1298 v7.3.1298
authorBram Moolenaar <Bram@vim.org>
Wed, 3 Jul 2013 15:51:17 +0000 (17:51 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 3 Jul 2013 15:51:17 +0000 (17:51 +0200)
Problem:    Crash.
Solution:   Use STRCPY() instead of STRCAT() and allocate one more byte.

src/misc2.c
src/version.c

index c63344f0da63ee948c50881fac395ac46fab8f98..bc158088825775404f8a5268d471accc9fea4e9b 100644 (file)
@@ -4680,11 +4680,11 @@ vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what,
     STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
     add_pathsep(ff_expand_buffer);
     {
-       char_u *buf = alloc(STRLEN(ff_expand_buffer)
-                                        + STRLEN(search_ctx->ffsc_fix_path));
+       int    eb_len = STRLEN(ff_expand_buffer);
+       char_u *buf = alloc(eb_len + STRLEN(search_ctx->ffsc_fix_path) + 1);
 
        STRCPY(buf, ff_expand_buffer);
-       STRCAT(buf, search_ctx->ffsc_fix_path);
+       STRCPY(buf + eb_len, search_ctx->ffsc_fix_path);
        if (mch_isdir(buf))
        {
            STRCAT(ff_expand_buffer, search_ctx->ffsc_fix_path);
index ea51c18479a710dfb439fad59c40c99fd442d69f..b9309af3ddf711db470a07ca317a33a7e7912240 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1298,
 /**/
     1297,
 /**/