forked from aniani/vim
patch 9.0.1104: invalid memory access when checking function argument types
Problem: Invalid memory access when checking function argument types. Solution: Do not check beyond the number of arguments. (closes #11755)
This commit is contained in:
@@ -848,7 +848,7 @@ check_type_maybe(
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < expected->tt_argcount; ++i)
|
||||
for (i = 0; i < expected->tt_argcount && i < actual->tt_argcount; ++i)
|
||||
// Allow for using "any" argument type, lambda's have them.
|
||||
if (actual->tt_args[i] != &t_any && check_type(
|
||||
expected->tt_args[i], actual->tt_args[i], FALSE,
|
||||
|
Reference in New Issue
Block a user