From: Bram Moolenaar Date: Sat, 8 Jan 2022 15:44:22 +0000 (+0000) Subject: patch 8.2.4041: using unitialized pointer X-Git-Tag: v8.2.4041 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa9b3cacd52a6c34591bbd89fb6b06d4c097fe03;p=thirdparty%2Fvim.git patch 8.2.4041: using unitialized pointer Problem: Using unitialized pointer. Solution: Store "ht" when variable is in another script. --- 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 @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4041, /**/ 4040, /**/