mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix plugins crashing when sector is too small.
This commit is contained in:
@@ -69,6 +69,9 @@ namespace DiscImageChef.Filesystems
|
||||
|
||||
byte[] tmp = imagePlugin.ReadSectors(sector + partition.Start, run);
|
||||
byte[] sbSector = new byte[AFS_SUPERBLOCK_SIZE];
|
||||
|
||||
if(offset + AFS_SUPERBLOCK_SIZE > tmp.Length) return false;
|
||||
|
||||
Array.Copy(tmp, offset, sbSector, 0, AFS_SUPERBLOCK_SIZE);
|
||||
|
||||
uint magic = BitConverter.ToUInt32(sbSector, 0x20);
|
||||
|
||||
Reference in New Issue
Block a user