aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-18 08:21:24 +0800
committerGitHub <noreply@github.com>2022-05-18 08:21:24 +0800
commit7ded303d684605ea44846c5f8a4031326529fb6d (patch)
tree0db0e34b5f4a55aa68a43e273e0674489566932d /src/nvim/ex_docmd.c
parent38cbca3eeadca86f1431ea7a97f498f6a9cd33c8 (diff)
downloadrneovim-7ded303d684605ea44846c5f8a4031326529fb6d.tar.gz
rneovim-7ded303d684605ea44846c5f8a4031326529fb6d.tar.bz2
rneovim-7ded303d684605ea44846c5f8a4031326529fb6d.zip
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(). https://github.com/vim/vim/commit/51f0bfb88a3554ca2dde777d78a59880d1ee37a8 Cherry-pick e_command_too_recursive from patch 8.2.3957.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index e845073c12..d309b5f8ff 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -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);