diff --git a/core/iwasm/aot/aot_runtime.c b/core/iwasm/aot/aot_runtime.c index ddafd918..c0e4e3e2 100644 --- a/core/iwasm/aot/aot_runtime.c +++ b/core/iwasm/aot/aot_runtime.c @@ -2920,6 +2920,9 @@ lookup_func_name(const char **func_names, uint32 *func_indexes, int64 low = 0, mid; int64 high = func_index_count - 1; + if (!func_names || !func_indexes || func_index_count == 0) + return NULL; + while (low <= high) { mid = (low + high) / 2; if (func_index == func_indexes[mid]) {