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:
James McCoy 2016-07-08 14:30:16 -04:00
parent aece3ffa7d
commit f1d912c584
2 changed files with 4 additions and 1 deletions

View File

@ -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 *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;
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1], true);

View File

@ -91,6 +91,7 @@ static int included_patches[] = {
1716,
1712,
1695,
1682,
1663,
1654,
1652,