Wenyong Huang
2024-01-23 21:38:30 +08:00
committed by GitHub
parent ab97d543e0
commit 9f64340529
9 changed files with 20 additions and 17 deletions

View File

@ -2013,7 +2013,8 @@ copy_buffer_to_iovec_app(wasm_module_inst_t module_inst, uint8 *buf_begin,
}
if (buf >= buf_begin + buf_size
|| buf + data->buf_len < buf /* integer overflow */
/* integer overflow */
|| data->buf_len > UINTPTR_MAX - (uintptr_t)buf
|| buf + data->buf_len > buf_begin + buf_size
|| size_to_copy == 0) {
break;

View File

@ -787,7 +787,7 @@ wasm_cluster_dup_c_api_imports(WASMModuleInstanceCommon *module_inst_dst,
{
/* workaround about passing instantiate-linking information */
CApiFuncImport **new_c_api_func_imports = NULL;
CApiFuncImport *c_api_func_imports;
CApiFuncImport *c_api_func_imports = NULL;
uint32 import_func_count = 0;
uint32 size_in_bytes = 0;