From: Bram Moolenaar Date: Tue, 20 Mar 2018 12:30:42 +0000 (+0100) Subject: patch 8.0.1622: possible NULL pointer dereference X-Git-Tag: v8.0.1622 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ed86ad170b60517eeddb54c2b22fdc888a22c0b;p=vim patch 8.0.1622: possible NULL pointer dereference Problem: Possible NULL pointer dereferencey. (Coverity) Solution: Reverse the check for a NULL pointer. --- diff --git a/src/quickfix.c b/src/quickfix.c index e8fe59b33..6e1e859a2 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -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) diff --git a/src/version.c b/src/version.c index 339ac9074..418ca0c9e 100644 --- a/src/version.c +++ b/src/version.c @@ -766,6 +766,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1622, /**/ 1621, /**/