Mercurial > vim
comparison src/quickfix.c @ 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 | 4db074f4394c |
children | 15c856a1617b |
comparison
equal
deleted
inserted
replaced
13496:b6d15fce31b1 | 13497:23ae1853abbb |
---|---|
4254 { | 4254 { |
4255 EMSG(_(e_invalpat)); | 4255 EMSG(_(e_invalpat)); |
4256 goto theend; | 4256 goto theend; |
4257 } | 4257 } |
4258 | 4258 |
4259 if (s != NULL && *s == NUL) | 4259 if (s == NULL || *s == NUL) |
4260 { | 4260 { |
4261 /* Pattern is empty, use last search pattern. */ | 4261 /* Pattern is empty, use last search pattern. */ |
4262 if (last_search_pat() == NULL) | 4262 if (last_search_pat() == NULL) |
4263 { | 4263 { |
4264 EMSG(_(e_noprevre)); | 4264 EMSG(_(e_noprevre)); |