mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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".
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user