summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-07 20:18:16 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-07 20:18:16 +0000
commit62a099cc6dbfc31c0ced3f6d895711208bf10518 (patch)
treefe990908fafea10cc1ed04dea39b028ee3ea9774
parenta4c96252b12c9ebc0ba563694c064e500d707b06 (diff)
patch 8.2.4034: Coverity warns for possibly using a NULL pointerv8.2.4034
Problem: Coverity warns for possibly using a NULL pointer. Solution: Check v_partial is not NULL.
-rw-r--r--src/version.c2
-rw-r--r--src/vim9type.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c
index 7f01ebe9f3..e2b5023e35 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4034,
+/**/
4033,
/**/
4032,
diff --git a/src/vim9type.c b/src/vim9type.c
index f28b88f236..6671f5e3d4 100644
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -375,7 +375,7 @@ typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int flags)
set_function_type(ufunc);
if (ufunc->uf_func_type != NULL)
{
- if (tv->v_type == VAR_PARTIAL
+ if (tv->v_type == VAR_PARTIAL && tv->vval.v_partial != NULL
&& tv->vval.v_partial->pt_argc > 0)
{
type = get_type_ptr(type_gap);