TSG-13243,TSG-13252: 从用户自定义的所有结果中选第一个被识别的APP拼接到app_full_path字段; 将用户自定义的所有结果拼接到app_full_path中存在写越界导致应用重启

This commit is contained in:
liuxueli
2023-01-04 16:51:23 +08:00
parent e0f6856189
commit 30b2f1cda9
2 changed files with 7 additions and 2 deletions

View File

@@ -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);