diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-08 15:44:22 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-08 15:44:22 +0000 |
commit | aa9b3cacd52a6c34591bbd89fb6b06d4c097fe03 (patch) | |
tree | 4920211d4d9c87e38fdedfd6e513ea0535592831 | |
parent | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f (diff) | |
download | vim-git-aa9b3cacd52a6c34591bbd89fb6b06d4c097fe03.tar.gz |
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.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 965b2048e..3be9993fd 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 9e4ae19cb..27512d44f 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, |