From e084509cc5c6036e4d17d5c4ae4008d0c8862be6 Mon Sep 17 00:00:00 2001 From: netliomax25-code Date: Tue, 9 Jun 2026 12:26:40 +0530 Subject: [PATCH] check buffer before reading branch hint data byte --- core/iwasm/interpreter/wasm_loader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/iwasm/interpreter/wasm_loader.c b/core/iwasm/interpreter/wasm_loader.c index a2c67bea2c..36a5c3fadf 100644 --- a/core/iwasm/interpreter/wasm_loader.c +++ b/core/iwasm/interpreter/wasm_loader.c @@ -5681,6 +5681,7 @@ handle_branch_hint_section(const uint8 *buf, const uint8 *buf_end, goto fail; } + CHECK_BUF(buf, buf_end, 1); uint8 data = *buf++; if (data == 0x00) new_hint->is_likely = false;