# HG changeset patch # User Bram Moolenaar # Date 1579548604 -3600 # Node ID 06ef1e438ac871d1805325ff523e6a9a9b66a1dc # Parent ba690b26dc16d2696cd9d2f1d17458f4509777d1 patch 8.2.0133: invalid memory access with search command Commit: https://github.com/vim/vim/commit/98a336dd497d3422e7efeef9f24cc9e25aeb8a49 Author: Bram Moolenaar Date: Mon Jan 20 20:22:30 2020 +0100 patch 8.2.0133: invalid memory access with search command Problem: Invalid memory access with search command. Solution: When :normal runs out of characters in bracketed paste mode break out of the loop.(closes #5511) diff --git a/src/edit.c b/src/edit.c --- a/src/edit.c +++ b/src/edit.c @@ -4959,9 +4959,9 @@ bracketed_paste(paste_mode_T mode, int d do c = vgetc(); while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR); - if (c == NUL || got_int) + if (c == NUL || got_int || (ex_normal_busy > 0 && c == Ctrl_C)) // When CTRL-C was encountered the typeahead will be flushed and we - // won't get the end sequence. + // won't get the end sequence. Except when using ":normal". break; if (has_mbyte) diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim --- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -1449,3 +1449,8 @@ func Test_searchdecl() bwipe! endfunc + +func Test_search_special() + " this was causing illegal memory access + exe "norm /\x80PS" +endfunc diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 133, +/**/ 132, /**/ 131,