1
0
mirror of synced 2025-02-25 22:38:07 +01:00

File check fixes if the position is too big for base stream

This commit is contained in:
KillzXGaming 2019-07-18 17:14:09 -04:00
parent 72cb2b1763
commit 4428dd20ef

View File

@ -46,7 +46,7 @@ namespace Toolbox.Library.IO
public bool CheckSignature(uint Identifier, long position = 0)
{
if (Position + 4 >= BaseStream.Length || position < 0)
if (Position + 4 >= BaseStream.Length || position < 0 || position + 4 >= BaseStream.Length)
return false;
Position = position;