diff options
| author | liuxueli <[email protected]> | 2023-05-15 16:38:56 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2023-05-15 17:01:06 +0800 |
| commit | d8b595ff2b5926aa6209d166ca087d9a11355106 (patch) | |
| tree | b810a7ed5a89cc6c2d015ed5bdd99666b1276297 | |
| parent | 2eb5a34e0f2806e587f8329dd65a6c0118f4411d (diff) | |
TSG-15014: 使用错误的bridge id获取异步存储空间,导致内存被覆写v6.0.11
| -rw-r--r-- | src/tsg_bridge.cpp | 2 | ||||
| -rw-r--r-- | src/tsg_entry.cpp | 7 | ||||
| -rw-r--r-- | src/tsg_rule.cpp | 2 | ||||
| -rw-r--r-- | test/src/gtest_rule.cpp | 5 |
4 files changed, 13 insertions, 3 deletions
diff --git a/src/tsg_bridge.cpp b/src/tsg_bridge.cpp index 1c018bd..a65db43 100644 --- a/src/tsg_bridge.cpp +++ b/src/tsg_bridge.cpp @@ -568,7 +568,7 @@ int session_runtime_action_context_async(const struct streaminfo *a_stream, void const struct session_runtime_action_context *session_runtime_action_context_new(const struct streaminfo *a_stream) { - struct session_runtime_action_context *srt_action_context=(struct session_runtime_action_context *)session_async_bridge_get_data(a_stream, g_tm_bridge_para[BRIDGE_TYPE_SESSION_PROCESS_CONTEXT].id); + struct session_runtime_action_context *srt_action_context=(struct session_runtime_action_context *)session_async_bridge_get_data(a_stream, g_tm_bridge_para[BRIDGE_TYPE_SESSION_ACTION_CONTEXT].id); if(srt_action_context==NULL) { srt_action_context=(struct session_runtime_action_context *)dictator_malloc(a_stream->threadnum, sizeof(struct session_runtime_action_context)); diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index cf03d1b..99f06d3 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -1499,7 +1499,12 @@ size_t session_app_id_and_properties_scan(const struct streaminfo *a_stream, str srt_process_context->hited_para.after_n_packets=after_n_packets; } } - + + if(srt_process_context!=NULL && srt_process_context->hited_app_id>0) + { + session_app_gather_results_update_matched_app_id(a_stream, srt_process_context->hited_app_id); + } + return hit_num; } diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index cb17006..7759912 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -2800,7 +2800,7 @@ size_t tsg_scan_nesting_addr(const struct streaminfo *a_stream, struct maat *fea return 0; } - struct session_runtime_attribute *srt_attribute=(struct session_runtime_attribute *)session_runtime_attribute_get(a_stream); + struct session_runtime_attribute *srt_attribute=(struct session_runtime_attribute *)session_runtime_attribute_new(a_stream); srt_attribute_set_ip_asn(a_stream, feather, &(srt_attribute->client_asn), &(srt_attribute->server_asn)); srt_attribute_set_ip_location(a_stream, feather, &(srt_attribute->client_location), &(srt_attribute->server_location)); diff --git a/test/src/gtest_rule.cpp b/test/src/gtest_rule.cpp index 74ec87e..3a36338 100644 --- a/test/src/gtest_rule.cpp +++ b/test/src/gtest_rule.cpp @@ -14,6 +14,11 @@ extern struct maat_runtime_para g_tsg_maat_rt_para; +const struct session_runtime_attribute *session_runtime_attribute_new(const struct streaminfo * a_stream) +{ + return NULL; +} + const struct session_runtime_attribute *session_runtime_attribute_get(const struct streaminfo * a_stream) { return 0; |
