0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.3693: Coverity warns for possibly using a NULL pointer

Problem:    Coverity warns for possibly using a NULL pointer.
Solution:   Check for NULL and give an error.
This commit is contained in:
Bram Moolenaar
2021-11-29 10:36:19 +00:00
parent 38453528c3
commit 293eb9ba46
3 changed files with 10 additions and 1 deletions

View File

@@ -3189,6 +3189,12 @@ exec_instructions(ectx_T *ectx)
{
ufunc = find_func(funcref->fr_func_name, FALSE, NULL);
}
if (ufunc == NULL)
{
SOURCING_LNUM = iptr->isn_lnum;
emsg(_(e_function_reference_invalid));
goto theend;
}
if (fill_partial_and_closure(pt, ufunc, ectx) == FAIL)
goto theend;
tv = STACK_TV_BOT(0);