Mercurial > vim
changeset 25419:8a0234862ce6 v8.2.3246
patch 8.2.3246: memory use after free
Commit: https://github.com/vim/vim/commit/77111e2bfc7316eb6b1e653386cef6441af806f8
Author: Bram Moolenaar <Bram@vim.org>
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".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 29 Jul 2021 21:15:04 +0200 |
parents | 183a7452d719 |
children | b0a6cb69b794 |
files | src/option.c src/version.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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