少年修仙传客户端代码仓库
Client_PangDeRong
2019-02-16 4cb337ccf0421b6fbb17cd3a41e0bf7282f9a9ed
3335 增加可能邮件格式错误导致数组越界的防护
1个文件已修改
6 ■■■■■ 已修改文件
System/FriendSystem/MailAllModel.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FriendSystem/MailAllModel.cs
@@ -369,6 +369,8 @@
        if (smatch.IsMatch(info.Text))
        {
            Match match = smatch.Match(info.Text);
            if(match.Groups.Count > 2)
            {
            MailConfig _mailModel = MailConfig.Get(match.Groups[1].Value);
            List<string> _mailParalist = new List<string>();
            if (_mailModel != null)
@@ -425,13 +427,13 @@
                }
            }
            }
        }
        else
        {
            DebugEx.Log("不需要解析模板邮件");
            string[] mailContentArray = info.Text.Split(new string[] { "<$_$>" }, StringSplitOptions.RemoveEmptyEntries);
            if (mailContentArray.Length > 0)
            if (mailContentArray.Length > 1)
            {
                FuncConfigConfig funcMailModel = FuncConfigConfig.Get(mailContentArray[0]);
                if (funcMailModel != null)