55ad4c7ec7
Fix several issues in wasm-c-api wasm_module_imports function: 1. Two of the if branches never set the module_name and name fields which are later passed as arguments to wasm_importtype_new, and eventually might cause double-free and/or use-after-free 2. Should zero module_name/name/extern_type at the start of loop iteration, and destroy their resources when failed at the end of loop iteration 2. No need to check `if (!extern_type) { continue; }`, as extern_type is converted from type and type is already checked 3. No need to wasm_importtype_vec_delete(out) when failed, as it is passed from outside and should be destroyed by outside |
||
---|---|---|
.. | ||
arch | ||
iwasm_common.cmake | ||
SConscript | ||
wasm_application.c | ||
wasm_c_api_internal.h | ||
wasm_c_api.c | ||
wasm_exec_env.c | ||
wasm_exec_env.h | ||
wasm_memory.c | ||
wasm_memory.h | ||
wasm_native.c | ||
wasm_native.h | ||
wasm_runtime_common.c | ||
wasm_runtime_common.h | ||
wasm_shared_memory.c | ||
wasm_shared_memory.h |