使用SFH进行摘要扫描时,增加scanner为空的判断。
This commit is contained in:
@@ -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];
|
GIE_result_t query_result[MAX_SCANNER_HIT_NUM];
|
||||||
int hit_region_cnt=0,compile_ret=0;
|
int hit_region_cnt=0,compile_ret=0;
|
||||||
_compile_result_t compile_result[rule_num];//dynamic array
|
_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];
|
GIE_handle_t* GIE_handle=sp->feather->scanner->digest_handle[sp->table_id];
|
||||||
unsigned long long digest_len=0;
|
unsigned long long digest_len=0;
|
||||||
char* digest_buff=NULL;
|
char* digest_buff=NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user