Don't try to read past partition end.

This commit is contained in:
2017-07-23 19:58:11 +01:00
parent f3e33aa7aa
commit dddf884c05
14 changed files with 44 additions and 18 deletions

View File

@@ -123,6 +123,9 @@ namespace DiscImageChef.Filesystems
uint sectors = QNX6_SuperBlockSize / imagePlugin.GetSectorSize();
uint bootSectors = QNX6_BootBlocksSize / imagePlugin.GetSectorSize();
if(partition.Start + bootSectors + sectors >= partition.End)
return false;
byte[] audiSector = imagePlugin.ReadSectors(partition.Start, sectors);
byte[] sector = imagePlugin.ReadSectors(partition.Start + bootSectors, sectors);
if(sector.Length < QNX6_SuperBlockSize)