mirror of
https://github.com/neovim/neovim.git
synced 2026-07-12 12:29:44 +00:00
vim-patch:9.1.1335: Coverity complains about Null pointer dereferences #40280
Problem: Coverity complains about Null pointer dereferences
Solution: before accessing ccline->cmdbuff check that ccline is not NULL
Fixes: Coverity issue 1646601
closes: vim/vim#17189
362be6ba27
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -385,8 +385,9 @@ int nextwild(expand_T *xp, int type, int options, bool escape)
|
||||
}
|
||||
|
||||
/// Create completion popup menu with items from "matches".
|
||||
static void cmdline_pum_create(CmdlineInfo *ccline, expand_T *xp, char **matches, int numMatches,
|
||||
bool showtail, bool cmdline_unchanged)
|
||||
static void cmdline_pum_create(const CmdlineInfo *ccline, expand_T *xp, char **matches,
|
||||
int numMatches, bool showtail, bool cmdline_unchanged)
|
||||
FUNC_ATTR_NONNULL_ARG(1, 2)
|
||||
{
|
||||
assert(numMatches >= 0);
|
||||
// Add all the completion matches
|
||||
|
||||
Reference in New Issue
Block a user