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:
@@ -56,11 +56,11 @@ namespace DiscImageChef.Filesystems
|
||||
{
|
||||
if(1 + partition.Start >= partition.End) return false;
|
||||
|
||||
if(imagePlugin.Info.SectorSize < 512) return false;
|
||||
|
||||
byte[] magicB = new byte[12];
|
||||
byte[] hbSector = imagePlugin.ReadSector(1 + partition.Start);
|
||||
|
||||
if(hbSector.Length < 512) return false;
|
||||
|
||||
Array.Copy(hbSector, 0x1F0, magicB, 0, 12);
|
||||
string magic = Encoding.ASCII.GetString(magicB);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user