diff options
| author | yangwei <[email protected]> | 2023-06-27 18:36:46 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2023-06-27 18:36:46 +0800 |
| commit | 66c5276eca67535a39a03c53bec20fc744c412ed (patch) | |
| tree | f12645a77a44d148db29c4bcc4dfc295148735f6 | |
| parent | d8e1578b936c95d04a16639660782f5d9c04004b (diff) | |
🐞 fix(app_identify_result_cb): 根据流信息获取当前包头部,避免访问空指针Fix-OMPUB-952-for-22.07
| -rw-r--r-- | src/tsg_action.cpp | 5 | ||||
| -rw-r--r-- | src/tsg_entry.cpp | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/tsg_action.cpp b/src/tsg_action.cpp index 124d7bd..368a7d8 100644 --- a/src/tsg_action.cpp +++ b/src/tsg_action.cpp @@ -192,7 +192,8 @@ static void template_generate(const struct streaminfo *a_stream, int status_code dict.SetValue("msg", tmp_buff);
dictator_free(thread_seq, tmp_buff);
- tmp_buff=NULL;
+ tmp_buff=NULL;
+
}
else
{
@@ -974,7 +975,7 @@ unsigned char tsg_deal_deny_action(const struct streaminfo *a_stream, Maat_rule_ }
user_region=(struct compile_user_region *)Maat_rule_get_ex_data(g_tsg_maat_feather, p_result, g_tsg_para.table_id[TABLE_SECURITY_COMPILE]);
- if(user_region==NULL)
+ if(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);
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index dc2e00f..a1c28e2 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -1838,7 +1838,8 @@ static int app_identify_result_cb(const struct streaminfo *a_stream, int bridge_ return 0; } - master_deal_scan_result(a_stream, context, scan_result, hit_num, NULL); + + master_deal_scan_result(a_stream, context, scan_result, hit_num, get_this_layer_header(a_stream)); return 0; } |
