Index: src/wasm/wasm-function-name-table.cc |
diff --git a/src/wasm/wasm-function-name-table.cc b/src/wasm/wasm-function-name-table.cc |
index cc52125500b9ed2b04e54249afd9546e6fd623f6..32c302d3c7b8fb359bc933fd389be2488c00609c 100644 |
--- a/src/wasm/wasm-function-name-table.cc |
+++ b/src/wasm/wasm-function-name-table.cc |
@@ -54,7 +54,7 @@ MaybeHandle<String> GetWasmFunctionNameFromTable( |
uint32_t num_funcs = static_cast<uint32_t>(func_names_array->get_int(0)); |
DCHECK(static_cast<int>(num_funcs) >= 0); |
Factory* factory = func_names_array->GetIsolate()->factory(); |
- DCHECK(func_index < num_funcs); |
+ if (func_index >= num_funcs) return {}; |
int offset = func_names_array->get_int(func_index + 1); |
if (offset < 0) return {}; |
int next_offset = func_index == num_funcs - 1 |