Fix plugins crashing when sector is too small.

This commit is contained in:
2019-05-06 20:09:25 +01:00
parent 4fa7e55a65
commit ca1a226c50
7 changed files with 25 additions and 12 deletions

View File

@@ -63,12 +63,12 @@ namespace DiscImageChef.Partitions
{
partitions = new List<Partition>();
if(imagePlugin.Info.SectorSize < 512) return false;
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
byte[] sector = imagePlugin.ReadSector(sectorOffset);
if(sector.Length < 512) return false;
AtariTable table = new AtariTable
{
boot = new byte[342],