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:
Sean Dewar
2022-01-29 05:27:29 +00:00
parent 082ff2190c
commit 15c9d88bb7
4 changed files with 15 additions and 22 deletions

View File

@@ -903,6 +903,8 @@ enum {
#define SB_MAX 100000 // Maximum 'scrollback' value.
#define TABSTOP_MAX 9999
/// Stores an identifier of a script or channel that last set an option.
typedef struct {
sctx_T script_ctx; /// script context where the option was last set