changeset 13497:23ae1853abbb v8.0.1622

patch 8.0.1622: possible NULL pointer dereference commit https://github.com/vim/vim/commit/6ed86ad170b60517eeddb54c2b22fdc888a22c0b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 20 13:30:42 2018 +0100 patch 8.0.1622: possible NULL pointer dereference Problem: Possible NULL pointer dereferencey. (Coverity) Solution: Reverse the check for a NULL pointer.
author Christian Brabandt <cb@256bit.org>
date Tue, 20 Mar 2018 13:45:06 +0100
parents b6d15fce31b1
children e2719254a7a4
files src/quickfix.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- a/src/version.c
+++ b/src/version.c
@@ -767,6 +767,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1622,
+/**/
     1621,
 /**/
     1620,