mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.2030: no max callback recursion limit
Problem: no max callback recursion limit Solution: bail out, if max call recursion for callback functions has been reached. This checks the 'maxfuncdepth' setting and throws E169 when a callback function recursively calls itself. closes: #13337 closes: #13339 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -3583,6 +3583,13 @@ call_callback(
|
||||
|
||||
if (callback->cb_name == NULL || *callback->cb_name == NUL)
|
||||
return FAIL;
|
||||
|
||||
if (callback_depth > p_mfd)
|
||||
{
|
||||
emsg(_(e_command_too_recursive));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
CLEAR_FIELD(funcexe);
|
||||
funcexe.fe_evaluate = TRUE;
|
||||
funcexe.fe_partial = callback->cb_partial;
|
||||
|
Reference in New Issue
Block a user