From 48a604845e33399893d6bf293e71bcd2a412800d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 31 Jan 2022 11:44:48 +0000 Subject: [PATCH] patch 8.2.4269: Coverity warns for using a NULL pointer Problem: Coverity warns for using a NULL pointer. Solution: Check for "name" to not be NULL. --- src/userfunc.c | 3 ++- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/userfunc.c b/src/userfunc.c index 747e4d477..371cfd328 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -4232,7 +4232,8 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free) name = prefixed; } } - else if (vim9script && vim_strchr(name, AUTOLOAD_CHAR) != NULL) + else if (vim9script && name != NULL + && vim_strchr(name, AUTOLOAD_CHAR) != NULL) { emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead)); goto ret_free; diff --git a/src/version.c b/src/version.c index abc67424c..87f384562 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4269, /**/ 4268, /**/ -- 2.50.1