Do not overflow device on Fossil identifying.

This commit is contained in:
2017-09-28 15:44:36 +01:00
parent 7b0b4053cb
commit 2a6e929c67

View File

@@ -147,6 +147,9 @@ namespace DiscImageChef.Filesystems
FossilHeader hdr = new FossilHeader();
if(partition.Start + hdrSector > imagePlugin.GetSectors())
return false;
byte[] sector = imagePlugin.ReadSector(partition.Start + hdrSector);
hdr = BigEndianMarshal.ByteArrayToStructureBigEndian<FossilHeader>(sector);