changeset 27482:14640c6fe1fe v8.2.4269

patch 8.2.4269: Coverity warns for using a NULL pointer Commit: https://github.com/vim/vim/commit/48a604845e33399893d6bf293e71bcd2a412800d Author: Bram Moolenaar <Bram@vim.org> 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.
author Bram Moolenaar <Bram@vim.org>
date Mon, 31 Jan 2022 12:45:05 +0100
parents c810c6709c5a
children e5134251817a
files src/userfunc.c src/version.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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,