mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Don't try to read past partition end.
This commit is contained in:
@@ -152,6 +152,9 @@ namespace DiscImageChef.Filesystems
|
||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, Partition partition)
|
||||
{
|
||||
uint bootSectors = JFS_BootBlocksSize / imagePlugin.GetSectorSize();
|
||||
if(partition.Start + bootSectors >= partition.End)
|
||||
return false;
|
||||
|
||||
byte[] sector = imagePlugin.ReadSector(partition.Start + bootSectors);
|
||||
if(sector.Length < 512)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user