From 30729e9394d0255ea8fb5c4720cdd713ddfdd0e6 Mon Sep 17 00:00:00 2001 From: Florian Date: Sat, 11 May 2024 23:14:40 +0200 Subject: [PATCH] Fix possible out-of-bounds access --- src/interpreter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/interpreter.c b/src/interpreter.c index 55f1b50e36ebca..63883930b90827 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -140,6 +140,7 @@ static jl_value_t *do_invoke(jl_value_t **args, size_t nargs, interpreter_state jl_method_instance_t *meth = (jl_method_instance_t*)args[0]; assert(jl_is_method_instance(meth)); jl_value_t *result = jl_invoke(argv[0], &argv[1], nargs - 2, meth); + jl_value_t *result = jl_invoke(argv[0], nargs == 2 ? NULL : &argv[1], nargs - 2, meth); JL_GC_POP(); return result; }