# HG changeset patch # User Bram Moolenaar # Date 1627586104 -7200 # Node ID 8a0234862ce6a44e8abc072f6e82481062a344f0 # Parent 183a7452d7194eca2216565bc78c15367cfaf49a patch 8.2.3246: memory use after free Commit: https://github.com/vim/vim/commit/77111e2bfc7316eb6b1e653386cef6441af806f8 Author: Bram Moolenaar Date: Thu Jul 29 21:11:30 2021 +0200 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 --- 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 --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3246, +/**/ 3245, /**/ 3244,