Skip to content

Commit 79ebd50

Browse files
committed
updated for version 7.3.1298
Problem: Crash. Solution: Use STRCPY() instead of STRCAT() and allocate one more byte.
1 parent a1e0a8e commit 79ebd50

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/misc2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4680,11 +4680,11 @@ vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what,
46804680
STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
46814681
add_pathsep(ff_expand_buffer);
46824682
{
4683-
char_u *buf = alloc(STRLEN(ff_expand_buffer)
4684-
+ STRLEN(search_ctx->ffsc_fix_path));
4683+
int eb_len = STRLEN(ff_expand_buffer);
4684+
char_u *buf = alloc(eb_len + STRLEN(search_ctx->ffsc_fix_path) + 1);
46854685

46864686
STRCPY(buf, ff_expand_buffer);
4687-
STRCAT(buf, search_ctx->ffsc_fix_path);
4687+
STRCPY(buf + eb_len, search_ctx->ffsc_fix_path);
46884688
if (mch_isdir(buf))
46894689
{
46904690
STRCAT(ff_expand_buffer, search_ctx->ffsc_fix_path);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,8 @@ static char *(features[]) =
728728

729729
static int included_patches[] =
730730
{ /* Add new patch number below this line */
731+
/**/
732+
1298,
731733
/**/
732734
1297,
733735
/**/

0 commit comments

Comments
 (0)