From d2db95e528f26200c5591b9d9e02b40acdfa947e Mon Sep 17 00:00:00 2001 From: zhengchao Date: Wed, 12 Jan 2022 10:43:46 +0500 Subject: [PATCH] =?UTF-8?q?Maat=5Frule=5Fget=5Fex=5Fdata=E8=AF=BB=E5=8F=96?= =?UTF-8?q?compile=20rule=E7=9A=84exdata=E6=97=B6=EF=BC=8C=E5=AF=B9scanner?= =?UTF-8?q?=E5=88=A4=E7=A9=BA=EF=BC=8C=E9=81=BF=E5=85=8D=E6=97=A0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=97=B6=E5=8F=91=E7=94=9F=E6=AE=B5=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E3=80=82=20=E4=BF=AE=E5=A4=8D=20TSG-9349?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_api.cpp | 4 ++++ src/entry/Maat_rule.cpp | 2 +- test/test_maatframe.cpp | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index 345f298..b9bbf2a 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -1146,6 +1146,10 @@ MAAT_RULE_EX_DATA Maat_rule_get_ex_data(Maat_feather_t feather, const struct Maa const struct compile_table_schema* compile_desc=NULL; const struct compile_ex_data_idx* ex_desc=NULL; MAAT_RULE_EX_DATA ad=NULL; + if(!_feather || !_feather->scanner) + { + return NULL; + } compile=(struct Maat_compile_rule*)Maat_hierarchy_compile_read_user_data(_feather->scanner->hier, rule->config_id); if(compile==NULL) { diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 4bf7053..69846cf 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -57,7 +57,7 @@ extern "C" } #endif -int MAAT_FRAME_VERSION_3_5_1_20211024=1; +int MAAT_FRAME_VERSION_3_5_2_20220112=1; int is_valid_table_name(const char* str) { diff --git a/test/test_maatframe.cpp b/test/test_maatframe.cpp index 3210c24..35a2c59 100644 --- a/test/test_maatframe.cpp +++ b/test/test_maatframe.cpp @@ -1231,7 +1231,6 @@ TEST(NOTLogic, ScanHitAtLastEmptyExpr) TEST(NOTLogic, ScanHitAtLastEmptyInteger) { const char* string_should_not_hit="This string should not hit."; - const char* string_match_no_region="This string is matched against a empty table."; int ret=0; int table_id=0; struct Maat_rule_t result[4];