mirror of
https://github.com/neovim/neovim.git
synced 2025-09-21 02:38:19 +00:00
vim-patch:8.2.4975: recursive command line loop may cause a crash (#18614)
Problem: Recursive command line loop may cause a crash.
Solution: Limit recursion of getcmdline().
51f0bfb88a
Cherry-pick e_command_too_recursive from patch 8.2.3957.
This commit is contained in:
@@ -345,7 +345,7 @@ int do_cmdline(char *cmdline, LineGetter fgetline, void *cookie, int flags)
|
||||
// here. The value of 200 allows nested function calls, ":source", etc.
|
||||
// Allow 200 or 'maxfuncdepth', whatever is larger.
|
||||
if (call_depth >= 200 && call_depth >= p_mfd) {
|
||||
emsg(_("E169: Command too recursive"));
|
||||
emsg(_(e_command_too_recursive));
|
||||
// When converting to an exception, we do not include the command name
|
||||
// since this is not an error of the specific command.
|
||||
do_errthrow((cstack_T *)NULL, NULL);
|
||||
|
Reference in New Issue
Block a user