aot loader: Verify global value type (#3560)
Fix issue reported by Oss-fuzz test (#69798). https://oss-fuzz.com/testcase-detail/5963842371256320
This commit is contained in:
@ -2170,6 +2170,9 @@ load_globals(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,
|
||||
read_uint8(buf, buf_end, globals[i].type.val_type);
|
||||
read_uint8(buf, buf_end, globals[i].type.is_mutable);
|
||||
|
||||
if (!is_valid_value_type(globals[i].type.val_type))
|
||||
return false;
|
||||
|
||||
buf = align_ptr(buf, 4);
|
||||
|
||||
if (!load_init_expr(&buf, buf_end, module, &globals[i].init_expr,
|
||||
|
||||
Reference in New Issue
Block a user