From 30b2f1cda99c767a964e1dc5c71b99682c8681ef Mon Sep 17 00:00:00 2001 From: liuxueli Date: Wed, 4 Jan 2023 16:51:23 +0800 Subject: [PATCH] =?UTF-8?q?TSG-13243,TSG-13252:=20=E4=BB=8E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=87=AA=E5=AE=9A=E4=B9=89=E7=9A=84=E6=89=80=E6=9C=89?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=AD=E9=80=89=E7=AC=AC=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=A2=AB=E8=AF=86=E5=88=AB=E7=9A=84APP=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E5=88=B0app=5Ffull=5Fpath=E5=AD=97=E6=AE=B5;=20=E5=B0=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=87=AA=E5=AE=9A=E4=B9=89=E7=9A=84=E6=89=80?= =?UTF-8?q?=E6=9C=89=E7=BB=93=E6=9E=9C=E6=8B=BC=E6=8E=A5=E5=88=B0app=5Fful?= =?UTF-8?q?l=5Fpath=E4=B8=AD=E5=AD=98=E5=9C=A8=E5=86=99=E8=B6=8A=E7=95=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=BA=94=E7=94=A8=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_rule.cpp | 5 +++++ src/tsg_send_log.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index 2e380f7..80d4f15 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -3250,6 +3250,11 @@ int tsg_app_id2name(int app_id, char *app_name, int app_name_len, int is_joint_p dict=(struct app_id_dict *)Maat_plugin_get_EX_data(g_tsg_maat_feather, g_tsg_para.table_id[TABLE_APP_ID_DICT], (const char *)app_id_buff); if(dict!=NULL) { + if((int)strlen(dict->app_name) > app_name_len) + { + return offset; + } + if(dict->parent_app_id!=0 && is_joint_parent==1) { offset=snprintf(app_name, app_name_len, "%s.%s", dict->parent_app_name, dict->app_name); diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp index 45c204a..4f1be74 100644 --- a/src/tsg_send_log.cpp +++ b/src/tsg_send_log.cpp @@ -832,11 +832,11 @@ int set_app_full_path(struct TLD_handle_t *_handle, char *field_name, struct gat if(result[ORIGIN_USER_DEFINE].app_num>0) { - combined_num+=copy_app_id(result[ORIGIN_USER_DEFINE].attributes, result[ORIGIN_USER_DEFINE].app_num, combined_array+combined_num, COMBINED_APP_ID_NUM-combined_num); + combined_num+=copy_app_id(result[ORIGIN_USER_DEFINE].attributes, 1, combined_array+combined_num, COMBINED_APP_ID_NUM-combined_num); } else if(result[ORIGIN_BUILT_IN].app_num>0) { - combined_num+=copy_app_id(result[ORIGIN_BUILT_IN].attributes, result[ORIGIN_BUILT_IN].app_num, combined_array+combined_num, COMBINED_APP_ID_NUM-combined_num); + combined_num+=copy_app_id(result[ORIGIN_BUILT_IN].attributes, 1, combined_array+combined_num, COMBINED_APP_ID_NUM-combined_num); } else if(result[ORIGIN_QM_ENGINE].app_num-result[ORIGIN_QM_ENGINE_L7].app_num > 0) {