summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-08 15:44:22 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-08 15:44:22 +0000
commitaa9b3cacd52a6c34591bbd89fb6b06d4c097fe03 (patch)
tree4920211d4d9c87e38fdedfd6e513ea0535592831
parent9f1a39a5d1cd7989ada2d1cb32f97d84360e050f (diff)
patch 8.2.4041: using unitialized pointerv8.2.4041
Problem: Using unitialized pointer. Solution: Store "ht" when variable is in another script.
-rw-r--r--src/evalvars.c4
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index 965b2048e4..3be9993fdc 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -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;
+ }
}
}
}
diff --git a/src/version.c b/src/version.c
index 9e4ae19cb0..27512d44f4 100644
--- 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 */
/**/
+ 4041,
+/**/
4040,
/**/
4039,