commit | 6ed86ad170b60517eeddb54c2b22fdc888a22c0b | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Mar 20 13:30:42 2018 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Mar 20 13:30:42 2018 +0100 |
tree | 3ffa019c9bfe797eb10578477c312ec613ae84b3 | |
parent | 6185903e3d07eb53326fc1403fc2de97ca31b775 [diff] [blame] |
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 e8fe59b..6e1e859 100644 --- a/src/quickfix.c +++ b/src/quickfix.c
@@ -4256,7 +4256,7 @@ goto theend; } - if (s != NULL && *s == NUL) + if (s == NULL || *s == NUL) { /* Pattern is empty, use last search pattern. */ if (last_search_pat() == NULL)