summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhengchao <[email protected]>2016-06-03 15:11:25 +0800
committerzhengchao <[email protected]>2016-06-03 15:11:25 +0800
commita591c06b2f07f4523915cf0faf2943fad6ea0e25 (patch)
treedec68360a90d75db7495d122cee551124db1762e
parent9b5dd186a76336fcbfb4e39dbcb1900422541f6f (diff)
使用SFH进行摘要扫描时,增加scanner为空的判断。v1.8
-rw-r--r--src/entry/Maat_api.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp
index c963634..82e3bb5 100644
--- a/src/entry/Maat_api.cpp
+++ b/src/entry/Maat_api.cpp
@@ -1352,7 +1352,14 @@ int Maat_stream_scan_digest(stream_para_t * stream_para, const char * data, int
GIE_result_t query_result[MAX_SCANNER_HIT_NUM];
int hit_region_cnt=0,compile_ret=0;
_compile_result_t compile_result[rule_num];//dynamic array
- //TODO: scanner ==NULL
+ if(data==NULL||data_len<=0)
+ {
+ return 0;
+ }
+ if(sp->feather->scanner==NULL)
+ {
+ return 0;
+ }
GIE_handle_t* GIE_handle=sp->feather->scanner->digest_handle[sp->table_id];
unsigned long long digest_len=0;
char* digest_buff=NULL;