Skip to content

Commit

Permalink
patch 8.0.1622: possible NULL pointer dereference
Browse files Browse the repository at this point in the history
Problem:    Possible NULL pointer dereferencey. (Coverity)
Solution:   Reverse the check for a NULL pointer.
  • Loading branch information
brammool committed Mar 20, 2018
1 parent 6185903 commit 6ed86ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/quickfix.c
Expand Up @@ -4256,7 +4256,7 @@ ex_vimgrep(exarg_T *eap)
goto theend;
}

if (s != NULL && *s == NUL)
if (s == NULL || *s == NUL)
{
/* Pattern is empty, use last search pattern. */
if (last_search_pat() == NULL)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -766,6 +766,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1622,
/**/
1621,
/**/
Expand Down

0 comments on commit 6ed86ad

Please sign in to comment.