Skip to content

Commit

Permalink
module.c: fix a null dereference in read_locals
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jun 16, 2024
1 parent 699c43d commit 359e660
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,9 @@ read_locals(const uint8_t **pp, const uint8_t *ep, struct func *func,
if (vec_count > 0) {
chunks =
mem_calloc(load_mctx(ctx), vec_count, sizeof(*chunks));
if (chunks == NULL) {
return ENOMEM;
}
}

uint32_t i;
Expand Down

0 comments on commit 359e660

Please sign in to comment.