From 77111e2bfc7316eb6b1e653386cef6441af806f8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 29 Jul 2021 21:11:30 +0200 Subject: [PATCH] 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". --- src/option.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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, /**/ -- 2.47.3