Maat_rule_get_ex_data读取compile rule的exdata时,对scanner判空,避免无配置时发生段错误。 修复 TSG-9349
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user