diff options
| author | zhengchao <[email protected]> | 2020-07-02 20:59:59 +0800 |
|---|---|---|
| committer | zhengchao <[email protected]> | 2020-07-02 20:59:59 +0800 |
| commit | aef9f808913b36d24d390a0a58c8533c41483738 (patch) | |
| tree | 3564d1f25d65222e308f595041c8fa258f6222ac | |
| parent | 61efaef045824518c9f222779322cd918b53f89e (diff) | |
Maat_hierarchy总是返回可用的compile_rule,以同步修复master分支中的bug:在对编译配置排序时,如果其已被删除,compile_sort_para_set会访问空指针,导致段错误。v3.0.1
| -rw-r--r-- | src/entry/Maat_api.cpp | 2 | ||||
| -rw-r--r-- | src/entry/Maat_hierarchy.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index 3630b16..2ae109d 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -247,7 +247,7 @@ int region_compile(_Maat_feather_t*feather, struct Maat_hierarchy_compile_mid* c } scan_ret=Maat_hierarchy_region_compile(compile_mid, is_last_region, (void**)compile_rule_array, MAX_SCANNER_HIT_NUM); - + //Maat_hierarchy is rwlock protected, it always returns non-NULL compile_rule. if(scan_ret>1) { qsort(compile_rule_array, scan_ret, sizeof(struct Maat_compile_rule*), diff --git a/src/entry/Maat_hierarchy.cpp b/src/entry/Maat_hierarchy.cpp index 3bd14b0..23de1b7 100644 --- a/src/entry/Maat_hierarchy.cpp +++ b/src/entry/Maat_hierarchy.cpp @@ -1206,7 +1206,7 @@ int Maat_hierarchy_region_compile(struct Maat_hierarchy_compile_mid* mid, int is { mid->not_clause_hitted_flag=1; } - else + else if(compile_array[i]->user_data)//For compile may be dettached by Maat_hierarchy_compile_dettach_user_data, only return non-NULL userdata. { if(r_in_c_cnt>0 || //compile hitted becasue of new reigon this_scan_region_hits==0) //or hit a compile that refer a NOT-logic group in previous scan. |
