- Add safety around extra chat GUID parsing

This commit is contained in:
Infi
2026-02-08 05:28:23 +01:00
parent 6744c6676c
commit 638ec1a211
2 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
<PropertyGroup>
<Version>1.34.1</Version>
<Version>1.34.2</Version>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+9
View File
@@ -158,9 +158,18 @@ internal partial class Message
{
// this does an encode and clone every time it's accessed, so cache
var data = raw.Data;
try
{
if (data[1] == 0x27 && data[2] == 18 && data[3] == 0x20)
return new Guid(data[4..^1]);
}
catch (ArgumentException ex)
{
Plugin.Log.Error(ex, "Failed to parse extra chat channel GUID");
Plugin.Log.Error($"Byte Array: ${string.Join(", ", data[4..^1])}");
return Guid.Empty;
}
}
return Guid.Empty;
}