mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
vim-patch:7.4.1567
Problem: Crash in assert_fails().
Solution: Check for NULL. (Dominique Pelle) Add a test.
1abb502635
This commit is contained in:
@@ -7688,7 +7688,8 @@ static void f_assert_fails(typval_T *argvars, typval_T *rettv)
|
||||
char_u buf[NUMBUFLEN];
|
||||
char *error = (char *)get_tv_string_buf_chk(&argvars[1], buf);
|
||||
|
||||
if (strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL) {
|
||||
if (error == NULL
|
||||
|| strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL) {
|
||||
prepare_assert_error(&ga);
|
||||
fill_assert_error(&ga, &argvars[2], NULL, &argvars[1],
|
||||
&vimvars[VV_ERRMSG].vv_tv);
|
||||
|
@@ -119,7 +119,7 @@ static int included_patches[] = {
|
||||
1570,
|
||||
1569,
|
||||
1568,
|
||||
// 1567,
|
||||
1567,
|
||||
// 1566 NA
|
||||
// 1565,
|
||||
// 1564,
|
||||
|
Reference in New Issue
Block a user