mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
vim-patch:8.2.4245: ":retab 0" may cause illegal memory access
Problem: ":retab 0" may cause illegal memory access.
Solution: Limit the value of 'tabstop' to 10000.
652dee4486
ex_retab change is N/A (+vartabs always available).
Nvim's set_num_option validation logic was refactored, hence why it looks
different from Vim's.
Also use XFREE_CLEAR in other places.
This commit is contained in:
@@ -1899,10 +1899,8 @@ void free_buf_options(buf_T *buf, int free_p_ff)
|
||||
clear_string_option(&buf->b_p_flp);
|
||||
clear_string_option(&buf->b_p_isk);
|
||||
clear_string_option(&buf->b_p_vsts);
|
||||
xfree(buf->b_p_vsts_nopaste);
|
||||
buf->b_p_vsts_nopaste = NULL;
|
||||
xfree(buf->b_p_vsts_array);
|
||||
buf->b_p_vsts_array = NULL;
|
||||
XFREE_CLEAR(buf->b_p_vsts_nopaste);
|
||||
XFREE_CLEAR(buf->b_p_vsts_array);
|
||||
clear_string_option(&buf->b_p_vts);
|
||||
XFREE_CLEAR(buf->b_p_vts_array);
|
||||
clear_string_option(&buf->b_p_keymap);
|
||||
|
Reference in New Issue
Block a user