From 2c0885383ec68b6b24dc808c3104f982ff902982 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 19 Sep 2025 11:35:36 -0400 Subject: [PATCH] Bound overlay checking in GetV4Version --- BinaryObjectScanner/Protection/SecuROM.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BinaryObjectScanner/Protection/SecuROM.cs b/BinaryObjectScanner/Protection/SecuROM.cs index aee5d5f8..b10f2abd 100644 --- a/BinaryObjectScanner/Protection/SecuROM.cs +++ b/BinaryObjectScanner/Protection/SecuROM.cs @@ -157,7 +157,7 @@ namespace BinaryObjectScanner.Protection // Search for the "AddD" string in the overlay bool found = false; int index = 0; - for (; index < 0x100; index++) + for (; index < 0x100 && index + 4 < overlayData.Length; index++) { int temp = index; byte[] overlaySample = overlayData.ReadBytes(ref temp, 0x04);