mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix infinite loop when dumping multisession disc.
This commit is contained in:
@@ -133,6 +133,7 @@ namespace Aaru.Core.Devices.Dumping
|
||||
int currentReadSpeed = _speed;
|
||||
bool crossingLeadOut = false;
|
||||
bool failedCrossingLeadOut = false;
|
||||
bool skippingLead = false;
|
||||
|
||||
for(ulong i = _resume.NextBlock; (long)i <= lastSector; i += blocksToRead)
|
||||
{
|
||||
@@ -147,6 +148,7 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
while(leadOutExtents.Contains(i))
|
||||
{
|
||||
skippingLead = true;
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -205,6 +207,16 @@ namespace Aaru.Core.Devices.Dumping
|
||||
!inData)
|
||||
blocksToRead += (uint)sectorsForOffset;
|
||||
|
||||
if(blocksToRead == 0)
|
||||
{
|
||||
if(!skippingLead)
|
||||
i += (ulong)sectorsForOffset;
|
||||
|
||||
skippingLead = false;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if(_fixOffset && !inData)
|
||||
{
|
||||
// TODO: FreeBSD bug
|
||||
|
||||
Reference in New Issue
Block a user