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 182ff34..decba50 100644
--- a/src/option.c
+++ b/src/option.c
@@ -807,7 +807,7 @@
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 6b37200..7710018 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3246,
+/**/
3245,
/**/
3244,