eval: Guard against matcher being NULL when matching
This commit is contained in:
parent
41d0ee6132
commit
d731fa828a
1 changed files with 4 additions and 0 deletions
|
|
@ -712,6 +712,10 @@ matcher_init_matching_inner(apfl_ctx ctx, struct matcher *matcher)
|
|||
struct apfl_value value = apfl_stack_must_get(ctx, -1);
|
||||
must_tmproot_add_value(ctx, value);
|
||||
|
||||
if (matcher == NULL) {
|
||||
apfl_raise_const_error(ctx, APFL_RESULT_ERR, apfl_messages.corrupted_bytecode);
|
||||
}
|
||||
|
||||
struct matcher_call_stack_entry matcher_cse = {
|
||||
.pc = 0,
|
||||
.matcher = matcher,
|
||||
|
|
|
|||
Loading…
Reference in a new issue