Fix a crash that would occur when an incomplete IPv6 packet would arrive.

This commit is contained in:
feyris-tan 2025-08-10 20:03:17 +02:00
parent e91b47037d
commit 16b5682fd4

View File

@ -1667,6 +1667,10 @@ namespace skyscraper5.Skyscraper.Scraper
}
else if (ipVersion == 6)
{
if (payload.Length < 40)
{
return;
}
MemoryStream ipv6Stream = new MemoryStream(payload, false);
byte byteA = ipv6Stream.ReadUInt8();
byte byteB = ipv6Stream.ReadUInt8();