summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-07-03 17:51:17 +0200
committerBram Moolenaar <bram@vim.org>2013-07-03 17:51:17 +0200
commitc1473a58d765fe463c9f2101f51f048356ac08fe (patch)
tree132908fba6ff53833c18ed4a3f28c00515aee9c3
parent94f081a1fa87366b68ced1e9b8e4e98da78e0744 (diff)
downloadvim-c1473a58d765fe463c9f2101f51f048356ac08fe.tar.gz
updated for version 7.3.1298v7.3.1298v7-3-1298
Problem: Crash. Solution: Use STRCPY() instead of STRCAT() and allocate one more byte.
-rw-r--r--src/misc2.c6
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/misc2.c b/src/misc2.c
index c63344f0..bc158088 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -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);
diff --git a/src/version.c b/src/version.c
index ea51c184..b9309af3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1298,
+/**/
1297,
/**/
1296,