Skip to content

Commit ef73a28

Browse files
committed
patch 8.1.0273: invalid memory access when using 'incsearch'
Problem: Invalid memory access when using 'incsearch'. Solution: Reset "patlen" when using previous search pattern.
1 parent d473c8c commit ef73a28

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/ex_getln.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,11 @@ may_adjust_incsearch_highlighting(
504504
return FAIL;
505505

506506
if (firstc == ccline.cmdbuff[skiplen])
507+
{
507508
pat = last_search_pattern();
509+
skiplen = 0;
510+
patlen = STRLEN(pat);
511+
}
508512
else
509513
pat = ccline.cmdbuff + skiplen;
510514

src/version.c

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

795795
static int included_patches[] =
796796
{ /* Add new patch number below this line */
797+
/**/
798+
273,
797799
/**/
798800
272,
799801
/**/

0 commit comments

Comments
 (0)