mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 7.4.1682
Problem: Coverity: no check for NULL. Solution: Add check for invalid argument to assert_match().
This commit is contained in:
parent
ef9d9b94a8
commit
72188e9aae
@ -9580,7 +9580,9 @@ f_assert_match(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
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))
|
||||||
{
|
{
|
||||||
prepare_assert_error(&ga);
|
prepare_assert_error(&ga);
|
||||||
fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1],
|
fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1],
|
||||||
|
@ -748,6 +748,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1682,
|
||||||
/**/
|
/**/
|
||||||
1681,
|
1681,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user