mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Don't try to read past partition end.
This commit is contained in:
@@ -210,10 +210,11 @@ namespace DiscImageChef.Filesystems
|
||||
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, Partition partition)
|
||||
{
|
||||
if(partition.Start >= partition.End)
|
||||
return false;
|
||||
|
||||
ulong vmfsSuperOff = VxFS_Base / imagePlugin.ImageInfo.sectorSize;
|
||||
|
||||
if(partition.Start + vmfsSuperOff >= partition.End)
|
||||
return false;
|
||||
|
||||
byte[] sector = imagePlugin.ReadSector(partition.Start + vmfsSuperOff);
|
||||
|
||||
uint magic = BitConverter.ToUInt32(sector, 0x00);
|
||||
|
||||
Reference in New Issue
Block a user