aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-08-01 10:45:01 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-08-01 11:27:11 -0400
commit20fc0519af073374506b7a2cf4c452c1a9d62146 (patch)
tree6e66dc4e9ca7c90c775d8385e8915c59787ff2d3
parent5e4fcc8b36cc9a618f5476b939830e0c397e1066 (diff)
downloadrneovim-20fc0519af073374506b7a2cf4c452c1a9d62146.tar.gz
rneovim-20fc0519af073374506b7a2cf4c452c1a9d62146.tar.bz2
rneovim-20fc0519af073374506b7a2cf4c452c1a9d62146.zip
vim-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". https://github.com/vim/vim/commit/77111e2bfc7316eb6b1e653386cef6441af806f8
-rw-r--r--src/nvim/option.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 95970a77f8..b40ecd22c8 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -770,7 +770,7 @@ void 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);
}
}
}