Bound overlay checking in GetV4Version

This commit is contained in:
Matt Nadareski
2025-09-19 11:35:36 -04:00
parent 04355d851a
commit 2c0885383e

View File

@@ -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);