# HG changeset patch # User Bram Moolenaar # Date 1643629505 -3600 # Node ID 14640c6fe1fe2c041ae3debcc123dfca328f68f9 # Parent c810c6709c5a69576a57e0a6449de97917a61f3d patch 8.2.4269: Coverity warns for using a NULL pointer Commit: https://github.com/vim/vim/commit/48a604845e33399893d6bf293e71bcd2a412800d Author: Bram Moolenaar Date: Mon Jan 31 11:44:48 2022 +0000 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. diff --git a/src/userfunc.c b/src/userfunc.c --- a/src/userfunc.c +++ b/src/userfunc.c @@ -4232,7 +4232,8 @@ define_function(exarg_T *eap, char_u *na 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 --- 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 */ /**/ + 4269, +/**/ 4268, /**/ 4267,