@@ -678,6 +678,8 @@ load_table_import(const uint8 **p_buf, const uint8 *buf_end,
678678#endif
679679 );
680680
681+ /* the table flag can't exceed one byte, only check in debug build given
682+ * the nature of mini-loader */
681683 p_org = p ;
682684 read_leb_uint32 (p , p_end , table_flag );
683685 bh_assert (p - p_org <= 1 );
@@ -727,6 +729,8 @@ load_memory_import(const uint8 **p_buf, const uint8 *buf_end,
727729 uint32 declare_init_page_count = 0 ;
728730 uint32 declare_max_page_count = 0 ;
729731
732+ /* the memory flag can't exceed one byte, only check in debug build given
733+ * the nature of mini-loader */
730734 p_org = p ;
731735 read_leb_uint32 (p , p_end , mem_flag );
732736 bh_assert (p - p_org <= 1 );
@@ -822,6 +826,8 @@ load_table(const uint8 **p_buf, const uint8 *buf_end, WASMTable *table,
822826#endif
823827 );
824828
829+ /* the table flag can't exceed one byte, only check in debug build given
830+ * the nature of mini-loader */
825831 p_org = p ;
826832 read_leb_uint32 (p , p_end , table -> table_type .flags );
827833 bh_assert (p - p_org <= 1 );
@@ -861,6 +867,8 @@ load_memory(const uint8 **p_buf, const uint8 *buf_end, WASMMemory *memory,
861867 bool is_memory64 = false;
862868#endif
863869
870+ /* the memory flag can't exceed one byte, only check in debug build given
871+ * the nature of mini-loader */
864872 p_org = p ;
865873 read_leb_uint32 (p , p_end , memory -> flags );
866874 bh_assert (p - p_org <= 1 );
0 commit comments