mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.0135: bracketed paste can still cause invalid memory access
Problem: Bracketed paste can still cause invalid memory access. (Dominique Pelle) Solution: Check for NULL pointer.
This commit is contained in:
@@ -4942,7 +4942,7 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
|||||||
int save_paste = p_paste;
|
int save_paste = p_paste;
|
||||||
|
|
||||||
// If the end code is too long we can't detect it, read everything.
|
// If the end code is too long we can't detect it, read everything.
|
||||||
if (STRLEN(end) >= NUMBUFLEN)
|
if (end != NULL && STRLEN(end) >= NUMBUFLEN)
|
||||||
end = NULL;
|
end = NULL;
|
||||||
++no_mapping;
|
++no_mapping;
|
||||||
allow_keys = 0;
|
allow_keys = 0;
|
||||||
|
@@ -1451,6 +1451,7 @@ func Test_searchdecl()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_search_special()
|
func Test_search_special()
|
||||||
" this was causing illegal memory access
|
" this was causing illegal memory access and an endless loop
|
||||||
|
set t_PE=
|
||||||
exe "norm /\x80PS"
|
exe "norm /\x80PS"
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -742,6 +742,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 */
|
||||||
|
/**/
|
||||||
|
135,
|
||||||
/**/
|
/**/
|
||||||
134,
|
134,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user