0
0
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:
Bram Moolenaar
2020-01-20 21:12:20 +01:00
parent 8ba6bb7c94
commit fe4bbac116
3 changed files with 5 additions and 2 deletions

View File

@@ -4942,7 +4942,7 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
int save_paste = p_paste;
// 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;
++no_mapping;
allow_keys = 0;