mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.3403: memory leak for :retab with invalid argument
Problem: Memory leak for :retab with invalid argument.
Solution: Free the memory. Make error messages consistent.
2ddb89f8a9
Changes in ex_retab are N/A (behind a non-FEAT_) and have been dropped.
This commit is contained in:
parent
5e81687d9a
commit
503e6f7832
@ -7513,8 +7513,10 @@ bool tabstop_set(char_u *var, long **array)
|
||||
for (cp = var; *cp != NUL;) {
|
||||
int n = atoi((char *)cp);
|
||||
|
||||
// Catch negative values, overflow and ridiculous big values.
|
||||
if (n < 0 || n > 9999) {
|
||||
semsg(_(e_invarg2), cp);
|
||||
XFREE_CLEAR(*array);
|
||||
return false;
|
||||
}
|
||||
(*array)[t++] = n;
|
||||
|
Loading…
Reference in New Issue
Block a user