aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-12 14:08:51 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-09-12 14:56:49 +0800
commit49aa9e17fa6f9b22550bff8f468c375ddf03fece (patch)
treee1acc84917bf6d932cff455c141c0eba4d4c9c1a /src/nvim/eval/funcs.c
parent38059b4f31d8c9374002e209bc9ee2df28ac17fa (diff)
downloadrneovim-49aa9e17fa6f9b22550bff8f468c375ddf03fece.tar.gz
rneovim-49aa9e17fa6f9b22550bff8f468c375ddf03fece.tar.bz2
rneovim-49aa9e17fa6f9b22550bff8f468c375ddf03fece.zip
vim-patch:8.2.2664: Vim9: not enough function arguments checked for string
Problem: Vim9: not enough function arguments checked for string. Solution: Check in balloon functions. Refactor function arguments. https://github.com/vim/vim/commit/32105ae88f3aa6a6af30336f0bc9f8eb81292cd7 Cherry-pick removal of useless check from patch 8.2.3840. vim-patch:8.2.3083: crash when passing null string to charclass() Problem: Crash when passing null string to charclass(). Solution: Bail out when string pointer is NULL. (Christian Brabandt, closes vim/vim#8498, closes vim/vim#8260) https://github.com/vim/vim/commit/72463f883cdfd08e29ab0018ef3889284848d5f1
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index 99dfa13d88..bff4361dcb 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -1772,7 +1772,7 @@ static void f_eventhandler(typval_T *argvars, typval_T *rettv, EvalFuncData fptr
/// "executable()" function
static void f_executable(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
{
- if (tv_check_for_string(&argvars[0], 1) == FAIL) {
+ if (tv_check_for_string_arg(argvars, 0) == FAIL) {
return;
}
@@ -1901,7 +1901,7 @@ static void f_win_execute(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
/// "exepath()" function
static void f_exepath(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
{
- if (tv_check_for_nonempty_string(&argvars[0], 1) == FAIL) {
+ if (tv_check_for_nonempty_string_arg(argvars, 0) == FAIL) {
return;
}