Added bound checks.

This commit is contained in:
2017-11-08 17:05:00 +00:00
parent 7d6674d7f5
commit 9b3f0dcca1
7 changed files with 22 additions and 0 deletions

View File

@@ -115,6 +115,9 @@ namespace DiscImageChef.PartPlugins
if(imagePlugin.GetSectorSize() < 512)
return false;
if(sectorOffset + 2 >= imagePlugin.GetSectors())
return false;
bool useDkl = false, useDkl8 = false, useDkl16 = false;
byte[] sunSector = imagePlugin.ReadSector(sectorOffset);