forked from aniani/vim
patch 8.0.1408: crash in setqflist()
Problem: Crash in setqflist(). Solution: Check for string to be NULL. (Dominique Pelle, closes #2464)
This commit is contained in:
@@ -4930,8 +4930,9 @@ qf_get_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
||||
qf_idx = -1;
|
||||
}
|
||||
}
|
||||
else if ((di->di_tv.v_type == VAR_STRING)
|
||||
&& (STRCMP(di->di_tv.vval.v_string, "$") == 0))
|
||||
else if (di->di_tv.v_type == VAR_STRING
|
||||
&& di->di_tv.vval.v_string != NULL
|
||||
&& STRCMP(di->di_tv.vval.v_string, "$") == 0)
|
||||
/* Get the last quickfix list number */
|
||||
qf_idx = qi->qf_listcount - 1;
|
||||
else
|
||||
@@ -5226,7 +5227,8 @@ qf_set_properties(qf_info_T *qi, dict_T *what, int action, char_u *title)
|
||||
newlist = FALSE; /* use the specified list */
|
||||
}
|
||||
else if (di->di_tv.v_type == VAR_STRING
|
||||
&& STRCMP(di->di_tv.vval.v_string, "$") == 0)
|
||||
&& di->di_tv.vval.v_string != NULL
|
||||
&& STRCMP(di->di_tv.vval.v_string, "$") == 0)
|
||||
{
|
||||
if (qi->qf_listcount > 0)
|
||||
qf_idx = qi->qf_listcount - 1;
|
||||
|
Reference in New Issue
Block a user