mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Don't try to read past partition end.
This commit is contained in:
@@ -391,6 +391,9 @@ namespace DiscImageChef.Filesystems
|
||||
if(bootBlockSize % imagePlugin.ImageInfo.sectorSize > 0)
|
||||
sectorsToRead++;
|
||||
|
||||
if(sbSector + partition.Start + sectorsToRead >= partition.End)
|
||||
return false;
|
||||
|
||||
byte[] bootSector = imagePlugin.ReadSectors(sbSector + partition.Start, sectorsToRead);
|
||||
int bootChk = 0;
|
||||
for(int i = 0; i < 0x1FF; i++)
|
||||
|
||||
Reference in New Issue
Block a user