[PATCH]handle matcher NULL pointer

This commit is contained in:
liuwentan
2023-06-20 17:34:46 +08:00
parent 8ad355d5d7
commit 7cb24d96f8
9 changed files with 48 additions and 25 deletions

View File

@@ -960,9 +960,12 @@ int expr_runtime_scan(struct expr_runtime *expr_rt, int thread_id,
return 0;
}
if (NULL == expr_rt->hs) {
return 0;
}
size_t n_hit_item = 0;
struct hs_scan_result hit_results[MAX_SCANNER_HIT_ITEM_NUM];
int ret = adapter_hs_scan(expr_rt->hs, thread_id, data, data_len,
hit_results, MAX_SCANNER_HIT_ITEM_NUM,
&n_hit_item);