]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4041: using unitialized pointer v8.2.4041
authorBram Moolenaar <Bram@vim.org>
Sat, 8 Jan 2022 15:44:22 +0000 (15:44 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 8 Jan 2022 15:44:22 +0000 (15:44 +0000)
Problem:    Using unitialized pointer.
Solution:   Store "ht" when variable is in another script.

src/evalvars.c
src/version.c

index 965b2048e4d9f8a9dac29fc2eef14abd08304b2c..3be9993fdce0886df637a9fbc5b02d5828b1a0f1 100644 (file)
@@ -2898,7 +2898,11 @@ find_var_also_in_script(char_u *name, hashtab_T **htp, int no_autoload)
                dictitem_T *di = find_var_in_ht(ht, 0, p + 1, no_autoload);
 
                if (di != NULL)
+               {
+                   if (htp != NULL)
+                       *htp = ht;
                    return di;
+               }
            }
        }
     }
index 9e4ae19cb02b2a30b573b088ba8c3a0c2eb9e59a..27512d44f4028481b5c49d50acb27e267e730fac 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4041,
 /**/
     4040,
 /**/