summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-11 19:02:22 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-11 19:02:22 +0200
commitef73a28401cde680dc0d02d4b0fb19ed659ec1d3 (patch)
tree1b07542bf7ddad491894d5293137fa661534ee32
parentd473c8c101262702ea9eeb14907ee20a786942b2 (diff)
patch 8.1.0273: invalid memory access when using 'incsearch'v8.1.0273
Problem: Invalid memory access when using 'incsearch'. Solution: Reset "patlen" when using previous search pattern.
-rw-r--r--src/ex_getln.c4
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index c2eb0a8dda..3fb9c86233 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -504,7 +504,11 @@ may_adjust_incsearch_highlighting(
return FAIL;
if (firstc == ccline.cmdbuff[skiplen])
+ {
pat = last_search_pattern();
+ skiplen = 0;
+ patlen = STRLEN(pat);
+ }
else
pat = ccline.cmdbuff + skiplen;
diff --git a/src/version.c b/src/version.c
index 68df1ecadc..510ce45d04 100644
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 273,
+/**/
272,
/**/
271,