diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-09-30 17:11:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-09-30 17:11:48 +0200 |
commit | 438d176e35c16d56ff3bb7a80300197ce5a30c4f (patch) | |
tree | 8b98767d59772aa5f4ec3357aa1eae1400db53fe /src/getchar.c | |
parent | b434ae2a1fcbbd43244c6130451de7f14346e224 (diff) | |
download | vim-git-438d176e35c16d56ff3bb7a80300197ce5a30c4f.tar.gz |
patch 8.1.0439: recursive use of getcmdline() still not protectedv8.1.0439
Problem: Recursive use of getcmdline() still not protected.
Solution: Instead of saving the command buffer when making a call which may
cause recursiveness, save the buffer when actually being called
recursively.
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/getchar.c b/src/getchar.c index cc8b344e1..6331cd76e 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -4666,7 +4666,6 @@ eval_map_expr( char_u *res; char_u *p; char_u *expr; - char_u *save_cmd; pos_T save_cursor; int save_msg_col; int save_msg_row; @@ -4678,13 +4677,6 @@ eval_map_expr( return NULL; vim_unescape_csi(expr); - save_cmd = save_cmdline_alloc(); - if (save_cmd == NULL) - { - vim_free(expr); - return NULL; - } - /* Forbid changing text or using ":normal" to avoid most of the bad side * effects. Also restore the cursor position. */ ++textlock; @@ -4700,7 +4692,6 @@ eval_map_expr( msg_col = save_msg_col; msg_row = save_msg_row; - restore_cmdline_alloc(save_cmd); vim_free(expr); if (p == NULL) |