OMPUB-952: 根据流信息获取当前包头部,避免访问空指针
This commit is contained in:
@@ -955,7 +955,7 @@ static unsigned char tsg_do_deny_action(const struct streaminfo *a_stream, struc
|
||||
unsigned char tsg_enforing_deny_application(const struct streaminfo *a_stream, struct maat_rule *p_result, enum TSG_PROTOCOL protocol, int app_id, enum ACTION_RETURN_TYPE type, const void *user_data)
|
||||
{
|
||||
struct app_id_dict *dict=(struct app_id_dict *)matched_rule_cites_app_id_dict(g_tsg_maat_feather, (long long)app_id);
|
||||
if(dict==NULL)
|
||||
if(dict==NULL || user_data==NULL)
|
||||
{
|
||||
set_drop_stream(a_stream, protocol);
|
||||
return ((type==ACTION_RETURN_TYPE_PROT) ? PROT_STATE_DROPPKT|PROT_STATE_DROPME: APP_STATE_DROPME|APP_STATE_DROPPKT);
|
||||
@@ -998,7 +998,7 @@ unsigned char tsg_enforing_deny(const struct streaminfo *a_stream, struct maat_r
|
||||
}
|
||||
|
||||
struct maat_compile *maat_compile=(struct maat_compile *)matched_rule_cites_security_compile(g_tsg_maat_feather, p_result->rule_id);
|
||||
if(maat_compile==NULL || maat_compile->user_region==NULL)
|
||||
if(maat_compile==NULL || maat_compile->user_region==NULL || user_data==NULL)
|
||||
{
|
||||
set_drop_stream(a_stream, protocol);
|
||||
return ((type==ACTION_RETURN_TYPE_PROT) ? PROT_STATE_DROPPKT|PROT_STATE_DROPME: APP_STATE_DROPME|APP_STATE_DROPPKT);
|
||||
|
||||
Reference in New Issue
Block a user