Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions core/iwasm/interpreter/wasm_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,8 @@ load_init_expr(WASMModule *module, const uint8 **p_buf, const uint8 *buf_end,

size =
sizeof(WASMArrayNewInitValues)
+ sizeof(WASMValue) * (uint64)len_val.i32;
+ sizeof(WASMValue)
* (uint64)(uint32)len_val.i32;
Comment on lines 1331 to +1334
if (!(array_init_values = loader_malloc(
Comment on lines 1331 to 1335
size, error_buf, error_buf_size))) {
goto fail;
Expand Down Expand Up @@ -1406,7 +1407,7 @@ load_init_expr(WASMModule *module, const uint8 **p_buf, const uint8 *buf_end,
error_buf, error_buf_size)) {
goto fail;
}
len = len_val.i32;
len = (uint32)len_val.i32;

cur_value.array_new_default.type_index = type_idx;
cur_value.array_new_default.length = len;
Expand Down
Loading