Do not try to read past partition.

This commit is contained in:
2016-09-14 16:05:46 +01:00
parent f18a888b15
commit cf43dfec03

View File

@@ -92,6 +92,10 @@ namespace DiscImageChef.Filesystems
return false;
ulong vmfsSuperOff = VMfs_Base / imagePlugin.ImageInfo.sectorSize;
if(partitionStart + vmfsSuperOff > partitionEnd)
return false;
byte[] sector = imagePlugin.ReadSector(partitionStart + vmfsSuperOff);
uint magic = BitConverter.ToUInt32(sector, 0x00);