diff options
| author | zhengchao <[email protected]> | 2022-01-13 12:06:09 +0500 |
|---|---|---|
| committer | zhengchao <[email protected]> | 2022-01-13 12:06:09 +0500 |
| commit | dd86ba5fc1d71296c9dab952894e4b9f0c6488c4 (patch) | |
| tree | 5406d2833e9f3dd7561457acdb7f7c4f197685d3 /src/entry/Maat_api.cpp | |
| parent | d2db95e528f26200c5591b9d9e02b40acdfa947e (diff) | |
JSON文件中不包含有效配置时,避免段错误。 TSG-9349v3.5.3
Diffstat (limited to 'src/entry/Maat_api.cpp')
| -rw-r--r-- | src/entry/Maat_api.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index b9bbf2a..8f94508 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -1637,10 +1637,10 @@ int Maat_scan_intval(Maat_feather_t feather,int table_id } -int Maat_similar_scan_string(Maat_feather_t feather,int table_id - ,const char* data,int data_len - ,struct Maat_rule_t*result,int rule_num - ,scan_status_t* mid,int thread_num) +int Maat_similar_scan_string(Maat_feather_t feather, int table_id, + const char* data, int data_len, + struct Maat_rule_t*result, int rule_num, + scan_status_t* mid, int thread_num) { int hit_region_cnt=0,compile_ret=0; struct _OUTER_scan_status_t* _mid=NULL; @@ -1676,7 +1676,11 @@ int Maat_similar_scan_string(Maat_feather_t feather,int table_id struct Maat_table_runtime* table_rt=Maat_table_runtime_get(my_scanner->table_rt_mgr, p_table->table_id); - GIE_handle_t* gie_handle=table_rt->similar.gie_handle; + GIE_handle_t* gie_handle=table_rt->similar.gie_handle; + if(gie_handle==NULL) + { + return 0; + } INC_SCANNER_REF(my_scanner,thread_num); alignment_int64_array_add(_feather->thread_call_cnt, thread_num, 1); |
