Skip to content

Commit

Permalink
EH: fix a NULL dereference w/o jump table
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jun 27, 2024
1 parent 7ca64df commit 4ed36a2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/insn_impl_eh.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,12 @@ INSN_IMPL(throw)
READ_LEB_U32(tagidx);
const struct module *m = MODULE;
CHECK(tagidx < m->nimportedtags + m->ntags);
const struct tagtype *tt = module_tagtype(m, tagidx);
const struct functype *ft = module_tagtype_functype(m, tt);
const struct resulttype *rt = &ft->parameter;
const struct resulttype *rt;
if (EXECUTING || VALIDATING) {
const struct tagtype *tt = module_tagtype(m, tagidx);
const struct functype *ft = module_tagtype_functype(m, tt);
rt = &ft->parameter;
}
if (EXECUTING) {
struct exec_context *ectx = ECTX;
/*
Expand Down

0 comments on commit 4ed36a2

Please sign in to comment.