Fix a crash that would occur when an incomplete IPv6 packet would arrive.
This commit is contained in:
parent
e91b47037d
commit
16b5682fd4
@ -1667,6 +1667,10 @@ namespace skyscraper5.Skyscraper.Scraper
|
|||||||
}
|
}
|
||||||
else if (ipVersion == 6)
|
else if (ipVersion == 6)
|
||||||
{
|
{
|
||||||
|
if (payload.Length < 40)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
MemoryStream ipv6Stream = new MemoryStream(payload, false);
|
MemoryStream ipv6Stream = new MemoryStream(payload, false);
|
||||||
byte byteA = ipv6Stream.ReadUInt8();
|
byte byteA = ipv6Stream.ReadUInt8();
|
||||||
byte byteB = ipv6Stream.ReadUInt8();
|
byte byteB = ipv6Stream.ReadUInt8();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user