0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2018-08-11 19:02:22 +02:00
parent d473c8c101
commit ef73a28401
2 changed files with 6 additions and 0 deletions

View File

@@ -504,7 +504,11 @@ may_adjust_incsearch_highlighting(
return FAIL; return FAIL;
if (firstc == ccline.cmdbuff[skiplen]) if (firstc == ccline.cmdbuff[skiplen])
{
pat = last_search_pattern(); pat = last_search_pattern();
skiplen = 0;
patlen = STRLEN(pat);
}
else else
pat = ccline.cmdbuff + skiplen; pat = ccline.cmdbuff + skiplen;

View File

@@ -794,6 +794,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
273,
/**/ /**/
272, 272,
/**/ /**/