Do not try to read past partition.

This commit is contained in:
2016-09-17 16:28:01 +01:00
parent fd80c5d843
commit 2ac66832bb

View File

@@ -245,6 +245,9 @@ namespace DiscImageChef.Filesystems
foreach(ulong position in positions) foreach(ulong position in positions)
{ {
if(position + partitionStart >= partitionEnd)
continue;
sector = imagePlugin.ReadSector(position); sector = imagePlugin.ReadSector(position);
anchor = new AnchorVolumeDescriptorPointer(); anchor = new AnchorVolumeDescriptorPointer();
IntPtr anchorPtr = Marshal.AllocHGlobal(Marshal.SizeOf(anchor)); IntPtr anchorPtr = Marshal.AllocHGlobal(Marshal.SizeOf(anchor));