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

@@ -137,6 +137,9 @@ namespace DiscImageChef.Filesystems
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, Partition partition)
{
if(partition.Start + 1 >= imagePlugin.GetSectors())
return false;
byte[] sector = imagePlugin.ReadSector(partition.Start + 1);
if(sector.Length < 512)
return false;