1
0
forked from aniani/vim

patch 8.2.0634: crash with null partial and blob

Problem:    Crash with null partial and blob.
Solution:   Check for NULL pointer.  Add more tests. (Yegappan Lakshmanan,
            closes #5984)
This commit is contained in:
Bram Moolenaar
2020-04-25 15:24:44 +02:00
parent 9d8d0b5c64
commit 92b83ccfda
20 changed files with 136 additions and 5 deletions

View File

@@ -2167,6 +2167,9 @@ f_insert(typval_T *argvars, typval_T *rettv)
int val, len;
char_u *p;
if (argvars[0].vval.v_blob == NULL)
return;
len = blob_len(argvars[0].vval.v_blob);
if (argvars[2].v_type != VAR_UNKNOWN)
{