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

@@ -130,7 +130,7 @@ namespace DiscImageChef.Filesystems
ulong sbSectorOff = 0x10000 / imagePlugin.GetSectorSize();
uint sbSectorSize = 0x1000 / imagePlugin.GetSectorSize();
if((sbSectorOff + sbSectorSize) >= partition.End)
if((sbSectorOff + partition.Start) >= partition.End)
return false;
byte[] sector = imagePlugin.ReadSectors(sbSectorOff + partition.Start, sbSectorSize);