From: Bram Moolenaar Date: Thu, 29 Jul 2021 19:11:30 +0000 (+0200) Subject: patch 8.2.3246: memory use after free X-Git-Tag: v8.2.3246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=77111e2bfc7316eb6b1e653386cef6441af806f8;p=thirdparty%2Fvim.git patch 8.2.3246: memory use after free Problem: Memory use after free. Solution: When clearing a string option set the pointer to "empty_option". --- diff --git a/src/option.c b/src/option.c index 182ff341cf..decba501a9 100644 --- a/src/option.c +++ b/src/option.c @@ -807,7 +807,7 @@ free_all_options(void) else if (options[i].var != VAR_WIN && (options[i].flags & P_STRING)) // buffer-local option: free global value - free_string_option(*(char_u **)options[i].var); + clear_string_option((char_u **)options[i].var); } } #endif diff --git a/src/version.c b/src/version.c index 6b372008c5..7710018b31 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3246, /**/ 3245, /**/