mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1880: Vim9: asan complains about adding zero to NULL
Problem: Vim9: Asan complains about adding zero to NULL. Solution: Check for argument count first.
This commit is contained in:
parent
ca17453e73
commit
af7a9066a9
@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1880,
|
||||
/**/
|
||||
1879,
|
||||
/**/
|
||||
|
@ -1475,11 +1475,13 @@ generate_BCALL(cctx_T *cctx, int func_idx, int argcount, int method_call)
|
||||
isn->isn_arg.shuffle.shfl_up = argoff - 1;
|
||||
}
|
||||
|
||||
if (argcount > 0)
|
||||
{
|
||||
// Check the types of the arguments.
|
||||
argtypes = ((type_T **)stack->ga_data) + stack->ga_len - argcount;
|
||||
if (argcount > 0 && internal_func_check_arg_types(
|
||||
argtypes, func_idx, argcount) == FAIL)
|
||||
if (internal_func_check_arg_types(argtypes, func_idx, argcount) == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if ((isn = generate_instr(cctx, ISN_BCALL)) == NULL)
|
||||
return FAIL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user