Fix some issues reported by Coverity (#1150)
module_wasm_app.c: add return value check for wasm_runtime_call_wasm aot_runtime.c: add return value check for aot_get_default_memory aot_runtime.c: add return value check before calling wasm app malloc/free func wasm_runtime_common.c: fix dead code warning in wasm_runtime_load_from_sections aot_emit_memory.c: fix potential integer overflow issue wasm_runtime.c: remove dead code in memory_instantiate, add assertion for globals samples simple/gui/littlevgl: fix fields of struct sigaction initialization issue host-tool: add return value check for sendto
This commit is contained in:
@ -141,7 +141,7 @@ aot_check_memory_overflow(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
comp_ctx->comp_data->memories[0].num_bytes_per_page;
|
||||
uint32 init_page_count =
|
||||
comp_ctx->comp_data->memories[0].mem_init_page_count;
|
||||
uint64 mem_data_size = num_bytes_per_page * init_page_count;
|
||||
uint64 mem_data_size = (uint64)num_bytes_per_page * init_page_count;
|
||||
|
||||
if (mem_offset + bytes <= mem_data_size) {
|
||||
/* inside memory space */
|
||||
|
||||
Reference in New Issue
Block a user