mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 12:46:14 +00:00
aot loader: Prevent loading multiple native symbol sections (#3538)
Don't allow to load multiple native symbol sections in aot loader since the aot compiler will create only one native symbol section. Fix issue reported by Oss-fuzz test (#69633).
This commit is contained in:
parent
c19bc95391
commit
fa8a80a115
|
@ -651,6 +651,12 @@ load_native_symbol_section(const uint8 *buf, const uint8 *buf_end,
|
|||
int32 i;
|
||||
const char *symbol;
|
||||
|
||||
if (module->native_symbol_list) {
|
||||
set_error_buf(error_buf, error_buf_size,
|
||||
"duplicated native symbol section");
|
||||
return false;
|
||||
}
|
||||
|
||||
read_uint32(p, p_end, cnt);
|
||||
|
||||
if (cnt > 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user