From 1aa056aaf883747f86ad4b177244713cbf2d78bc Mon Sep 17 00:00:00 2001 From: fengweihao Date: Thu, 6 Apr 2023 14:51:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8Dmaat=5Fstate=5Fset=5Fscan=5Fd?= =?UTF-8?q?istrict=E6=8E=A5=E5=8F=A3=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/verify_matcher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/src/verify_matcher.cpp b/platform/src/verify_matcher.cpp index d1ec97b..c38eed6 100644 --- a/platform/src/verify_matcher.cpp +++ b/platform/src/verify_matcher.cpp @@ -190,6 +190,7 @@ void pangu_http_ctx_free(void * pme) if(ctx->enforce_rules) FREE(&ctx->enforce_rules); + if(ctx->hit_rules) FREE(&ctx->hit_rules); @@ -1568,7 +1569,7 @@ static int policy_verify_scan_http_hdr(struct request_query_obj *request, struct int table_id = request->table_id; const char *value = request->keyword; const char * str_field_name = request->district; - scan_ret = maat_state_set_scan_district(ctx->scan_mid, str_field_name, strlen(str_field_name)); + scan_ret = maat_state_set_scan_district(ctx->scan_mid, g_policy_rt->scan_table_id[compile_type][table_id], str_field_name, strlen(str_field_name)); assert(scan_ret == 0); scan_ret = maat_scan_string(g_policy_rt->feather[vsys_id][compile_type], g_policy_rt->scan_table_id[compile_type][table_id], value, strlen(value), ctx->result + hit_cnt, MAX_SCAN_RESULT - hit_cnt,