mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.1682
Problem: Coverity: no check for NULL.
Solution: Add check for invalid argument to assert_match().
72188e9aae
This commit is contained in:
parent
aece3ffa7d
commit
f1d912c584
@ -7770,7 +7770,9 @@ static void f_assert_match(typval_T *argvars, typval_T *rettv)
|
|||||||
char_u *pat = get_tv_string_buf_chk(&argvars[0], buf1);
|
char_u *pat = get_tv_string_buf_chk(&argvars[0], buf1);
|
||||||
char_u *text = get_tv_string_buf_chk(&argvars[1], buf2);
|
char_u *text = get_tv_string_buf_chk(&argvars[1], buf2);
|
||||||
|
|
||||||
if (!pattern_match(pat, text, false)) {
|
if (pat == NULL || text == NULL) {
|
||||||
|
EMSG(_(e_invarg));
|
||||||
|
} else if (!pattern_match(pat, text, false)) {
|
||||||
garray_T ga;
|
garray_T ga;
|
||||||
prepare_assert_error(&ga);
|
prepare_assert_error(&ga);
|
||||||
fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1], true);
|
fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1], true);
|
||||||
|
@ -91,6 +91,7 @@ static int included_patches[] = {
|
|||||||
1716,
|
1716,
|
||||||
1712,
|
1712,
|
||||||
1695,
|
1695,
|
||||||
|
1682,
|
||||||
1663,
|
1663,
|
||||||
1654,
|
1654,
|
||||||
1652,
|
1652,
|
||||||
|
Loading…
Reference in New Issue
Block a user