mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
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.32105ae88f
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)72463f883c
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user