This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
wasm-micro-runtime/core/iwasm/common
Wenyong Huang 55ad4c7ec7
Fix wasm-c-api wasm_module_imports issues (#1021)
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
2022-02-24 09:36:46 +08:00
..
arch Apply clang-format for more src files and update spec test script (#775) 2021-10-08 17:47:11 +08:00
iwasm_common.cmake Implement XIP feature and enable ARC target support (#694) 2021-08-12 17:44:39 +08:00
SConscript Add ia32 support and fix compiling issue for RT-Thread (#730) 2021-09-07 10:20:14 +08:00
wasm_application.c Fix debug thread not created issue (#983) 2022-01-26 09:56:01 +08:00
wasm_c_api_internal.h Refactor externref related APIs of reference types feature (#971) 2022-01-19 11:25:08 +08:00
wasm_c_api.c Fix wasm-c-api wasm_module_imports issues (#1021) 2022-02-24 09:36:46 +08:00
wasm_exec_env.c [debugger enhance] don't block gdbserver thread while executing (#989) 2022-02-16 17:35:35 +08:00
wasm_exec_env.h Refactor externref related APIs of reference types feature (#971) 2022-01-19 11:25:08 +08:00
wasm_memory.c Apply clang-format for more src files and update spec test script (#775) 2021-10-08 17:47:11 +08:00
wasm_memory.h Apply clang-format for more src files and update spec test script (#775) 2021-10-08 17:47:11 +08:00
wasm_native.c Refactor externref related APIs of reference types feature (#971) 2022-01-19 11:25:08 +08:00
wasm_native.h Apply clang-format for more src files and update spec test script (#775) 2021-10-08 17:47:11 +08:00
wasm_runtime_common.c Update document and fix wasm_runtime_call_wasm_a issue (#1005) 2022-02-14 17:36:38 +08:00
wasm_runtime_common.h Refactor externref related APIs of reference types feature (#971) 2022-01-19 11:25:08 +08:00
wasm_shared_memory.c Refine codes and fix several issues (#882) 2021-12-10 18:13:17 +08:00
wasm_shared_memory.h Apply clang-format for more src files and update spec test script (#775) 2021-10-08 17:47:11 +08:00