From a591c06b2f07f4523915cf0faf2943fad6ea0e25 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Fri, 3 Jun 2016 15:11:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8SFH=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=91=98=E8=A6=81=E6=89=AB=E6=8F=8F=E6=97=B6=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0scanner=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_api.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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;