patch 9.0.1846: [security] crash in fullcommand Commit: https://github.com/vim/vim/commit/4c6fe2e2ea62469642ed1d80b16d39e616b25cf5 Author: Christian Brabandt <c...@256bit.org> Date: Sat Sep 2 19:30:03 2023 +0200
patch 9.0.1846: [security] crash in fullcommand Problem: crash in fullcommand Solution: Check for typeval correctly Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 32d52ab21..10d979d49 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4087,7 +4087,7 @@ f_fullcommand(typval_T *argvars, typval_T *rettv) || check_for_opt_bool_arg(argvars, 1) == FAIL)) return; - name = argvars[0].vval.v_string; + name = tv_get_string(&argvars[0]); if (name == NULL) return; diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 0eda5de38..ab1dbf3b5 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -3607,4 +3607,9 @@ func Test_string_reverse() let &encoding = save_enc endfunc +func Test_fullcommand() + " this used to crash vim + call assert_equal('', fullcommand(10)) +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 3de6046ff..5cde7c185 100644 --- a/src/version.c +++ b/src/version.c @@ -699,6 +699,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1846, /**/ 1845, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1qcUgB-00CLN4-RL%40256bit.org.