summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-23 16:37:18 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-23 16:37:18 +0100
commit7f9a5a68fe363db467a505502237c1e8479c1436 (patch)
tree49178a3128f8672899878fe7665ddf13fd0bf466
parent259a741044812df739457e25eb5195d9c5c0e6f8 (diff)
patch 9.0.0558: Coverity warns for possibly using NULL pointerv9.0.0558
Problem: Coverity warns for possibly using NULL pointer. Solution: Only use "evalarg" when not NULL.
-rw-r--r--src/eval.c3
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index d369df5e01..0102bd70b5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6380,7 +6380,8 @@ handle_subscript(
**arg = NUL;
idx = find_exported(rettv->vval.v_number, exp_name, &ufunc, &type,
- evalarg->eval_cctx, evalarg->eval_cstack, verbose);
+ evalarg == NULL ? NULL : evalarg->eval_cctx,
+ evalarg == NULL ? NULL : evalarg->eval_cstack, verbose);
**arg = cc;
if (idx < 0 && ufunc == NULL)
diff --git a/src/version.c b/src/version.c
index f01afe3862..48f2ca559b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 558,
+/**/
557,
/**/
556,