mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
vim-patch:7.4.1136
Problem: Wrong argument to assert_exception() causes a crash. (reported by
Coverity)
Solution: Check for NULL pointer. Add a test.
da5dcd9366
This commit is contained in:
@@ -7667,7 +7667,8 @@ static void f_assert_exception(typval_T *argvars, typval_T *rettv)
|
||||
ga_concat(&ga, (char_u *)"v:exception is not set");
|
||||
assert_error(&ga);
|
||||
ga_clear(&ga);
|
||||
} else if (strstr((char *)vimvars[VV_EXCEPTION].vv_str, error) == NULL) {
|
||||
} else if (error != NULL
|
||||
&& strstr((char *)vimvars[VV_EXCEPTION].vv_str, error) == NULL) {
|
||||
prepare_assert_error(&ga);
|
||||
fill_assert_error(&ga, &argvars[1], NULL, &argvars[0],
|
||||
&vimvars[VV_EXCEPTION].vv_tv);
|
||||
|
Reference in New Issue
Block a user