mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 14:56:08 +00:00
vim-patch:9.1.0913: no error check for neg values for 'messagesopt' (#31511)
Problem: no error check for neg values for 'messagesopt'
(after v9.1.0908)
Solution: add additional error checks and tests (h-east)
closes: vim/vim#16187
65be834c30
Nvim's getdigits() checks for overflow, so the code change isn't needed.
Co-authored-by: h-east <h.east.727@gmail.com>
This commit is contained in:
@@ -1098,11 +1098,13 @@ int messagesopt_changed(void)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
assert(messages_history_new >= 0);
|
||||
// "history" must be <= 10000
|
||||
if (messages_history_new > 10000) {
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
assert(messages_wait_new >= 0);
|
||||
// "wait" must be <= 10000
|
||||
if (messages_wait_new > 10000) {
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user