Add integer overflow check for some indices in wasm/aot loader (#3579)

Check whether the indices overflow UINT32_MAX or not for:
- import function count + function count
- import global count + global count
- import tag count + tag count

This PR fixes the issue reported by Oss-fuzz test (#69920).
This commit is contained in:
liang.he
2024-07-02 15:48:37 +08:00
committed by GitHub
parent 3d4d8e61f0
commit f118492b1d
5 changed files with 43 additions and 0 deletions

View File

@ -23,6 +23,10 @@ is_valid_value_type(uint8 value_tpye);
bool
is_valid_func_type(const WASMFuncType *func_type);
bool
is_indices_overflow(uint32 import, uint32 other, char *error_buf,
uint32 error_buf_size);
#ifdef __cplusplus
}
#endif