Fix AaruFormat's DDT verification when its size on-image is bigger than 1MiB. Fixes #726

(cherry picked from commit e803ae4519)
This commit is contained in:
2022-04-13 13:40:51 +01:00
parent d56411a689
commit 4abab9482a

View File

@@ -151,13 +151,13 @@ namespace Aaru.DiscImages
"Verifying deduplication table type {0} at position {1}",
entry.dataType, entry.offset);
while(readBytes + verifySize < ddtHeader.cmpLength)
{
verifyBytes = new byte[readBytes];
_imageStream.Read(verifyBytes, 0, verifyBytes.Length);
crcVerify.Update(verifyBytes);
readBytes += (ulong)verifyBytes.LongLength;
}
while(readBytes + verifySize < ddtHeader.cmpLength)
{
verifyBytes = new byte[verifySize];
_imageStream.Read(verifyBytes, 0, verifyBytes.Length);
crcVerify.Update(verifyBytes);
readBytes += (ulong)verifyBytes.LongLength;
}
verifyBytes = new byte[ddtHeader.cmpLength - readBytes];
_imageStream.Read(verifyBytes, 0, verifyBytes.Length);