]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.0273: invalid memory access when using 'incsearch' v8.1.0273
authorBram Moolenaar <Bram@vim.org>
Sat, 11 Aug 2018 17:02:22 +0000 (19:02 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 11 Aug 2018 17:02:22 +0000 (19:02 +0200)
Problem:    Invalid memory access when using 'incsearch'.
Solution:   Reset "patlen" when using previous search pattern.

src/ex_getln.c
src/version.c

index c2eb0a8dda18b07c00ccd221265d0f5cf02637f6..3fb9c8623351d6f8a593ff19c4006a6830764bba 100644 (file)
@@ -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;
 
index 68df1ecadc263abeb23477e622ec1300a099a7f4..510ce45d04d4e0cff9ec08a93b09c8b35fe00b1f 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    273,
 /**/
     272,
 /**/