(PRS): limit decompressed block size.

This commit is contained in:
morkt 2019-03-30 18:48:14 +04:00
parent b35a80dcdc
commit 65662783ec

View File

@ -189,6 +189,7 @@ namespace GameRes.Formats.Marble
++shift;
if (dst < shift)
throw new InvalidFormatException ("Invalid offset value");
length = Math.Min (length, m_output.Length - dst);
Binary.CopyOverlapped (m_output, dst-shift, dst, length);
dst += length;
}