changeset 27782:40ae50de0d27 v8.2.4417

patch 8.2.4417: using NULL pointer Commit: https://github.com/vim/vim/commit/e89bfd212b21c227f026e467f882c62cdd6e642d Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 18 18:34:45 2022 +0000 patch 8.2.4417: using NULL pointer Problem: Using NULL pointer. Solution: Set offset after checking for NULL pointer.
author Bram Moolenaar <Bram@vim.org>
date Fri, 18 Feb 2022 19:45:03 +0100
parents 7ec5d3ebe807
children 59ce43efd4be
files src/userfunc.c src/version.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -4024,7 +4024,7 @@ untrans_function_name(char_u *name)
 get_scriptlocal_funcname(char_u *funcname)
 {
     char	sid_buf[25];
-    int		off = *funcname == 's' ? 2 : 5;
+    int		off;
     char_u	*newname;
     char_u	*p = funcname;
 
@@ -4047,6 +4047,8 @@ get_scriptlocal_funcname(char_u *funcnam
 	++p;
 	off = 0;
     }
+    else
+	off = *funcname == 's' ? 2 : 5;
 
     if (!SCRIPT_ID_VALID(current_sctx.sc_sid))
     {
--- 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 */
 /**/
+    4417,
+/**/
     4416,
 /**/
     4415,