删除空壳编译配置(被group引用但无compile)时,未对table判空的bug。

This commit is contained in:
zhengchao
2018-11-23 16:12:02 +08:00
parent eeb5fa279f
commit d2f78657dd
2 changed files with 2 additions and 2 deletions

View File

@@ -1002,7 +1002,7 @@ void _destroy_compile_rule(struct _Maat_compile_inner_t * compile_rule)
free(db_compile_rule); free(db_compile_rule);
compile_rule->db_c_rule=NULL; compile_rule->db_c_rule=NULL;
} }
for(i=0; i<table->ex_data_num; i++) for(i=0; table!=NULL && i<table->ex_data_num; i++)
{ {
rule_ex_data_free(&(db_compile_rule->m_rule_head), db_compile_rule->service_defined, compile_rule->ads+i, table->ex_desc+i); rule_ex_data_free(&(db_compile_rule->m_rule_head), db_compile_rule->service_defined, compile_rule->ads+i, table->ex_desc+i);
compile_rule->ads[i]=NULL; compile_rule->ads[i]=NULL;

View File

@@ -46,7 +46,7 @@ typedef int atomic_t;
#define MAX_PLUGIN_PER_TABLE 32 #define MAX_PLUGIN_PER_TABLE 32
#define MAX_FOREIGN_CLMN_NUM 8 #define MAX_FOREIGN_CLMN_NUM 8
#define MAX_SCANNER_HIT_NUM 64 #define MAX_SCANNER_HIT_NUM 64
#define MAX_COMPILE_EX_DATA_NUM 8 #define MAX_COMPILE_EX_DATA_NUM 2
#define MAX_GROUP_CACHE 128 #define MAX_GROUP_CACHE 128
#define MAX_FAILED_NUM 128 #define MAX_FAILED_NUM 128