mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Guard against reading beyond partition end when identifying UNICOS filesystem. Fixes #581
This commit is contained in:
@@ -75,6 +75,9 @@ namespace Aaru.Filesystems
|
||||
if(Marshal.SizeOf<Superblock>() % imagePlugin.Info.SectorSize != 0)
|
||||
sbSize++;
|
||||
|
||||
if(partition.Start + sbSize >= partition.End)
|
||||
return false;
|
||||
|
||||
byte[] sector = imagePlugin.ReadSectors(partition.Start, sbSize);
|
||||
|
||||
if(sector.Length < Marshal.SizeOf<Superblock>())
|
||||
|
||||
Reference in New Issue
Block a user