File check fixes if the position is too big for base stream
This commit is contained in:
parent
72cb2b1763
commit
4428dd20ef
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user