From 16b5682fd4840dfc3c877e3b407f222afc8d506c Mon Sep 17 00:00:00 2001 From: feyris-tan <4116042+feyris-tan@users.noreply.github.com> Date: Sun, 10 Aug 2025 20:03:17 +0200 Subject: [PATCH] Fix a crash that would occur when an incomplete IPv6 packet would arrive. --- skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs b/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs index e6da9be..f9fbf84 100644 --- a/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs +++ b/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs @@ -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();