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:
@@ -66,6 +66,8 @@ namespace DiscImageChef.Filesystems
|
||||
|
||||
byte[] sbSector = imagePlugin.ReadSector(sbSectorOff + partition.Start);
|
||||
byte[] sb = new byte[512];
|
||||
if(sbOff + 512 > sbSector.Length) return false;
|
||||
|
||||
Array.Copy(sbSector, sbOff, sb, 0, 512);
|
||||
|
||||
ushort magic = BitConverter.ToUInt16(sb, 0x038);
|
||||
|
||||
Reference in New Issue
Block a user