From ea03100d9e6988f6c8c2792f2e829b450a3bdf2c Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 24 Oct 2014 08:43:05 +0200 Subject: Linux/MacOSX : fix encryption/decryption issues with hard drives that have a sector size bigger than 512. Now, we use the sector size as the minimum unit for data fragment encryption/decryption. --- src/Volume/EncryptionThreadPool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Volume/EncryptionThreadPool.cpp b/src/Volume/EncryptionThreadPool.cpp index 6635df70..9d39570f 100644 --- a/src/Volume/EncryptionThreadPool.cpp +++ b/src/Volume/EncryptionThreadPool.cpp @@ -108,7 +108,7 @@ namespace VeraCrypt workItem->Encryption.StartUnitNo = fragmentStartUnitNo; workItem->Encryption.SectorSize = sectorSize; - fragmentData += unitsPerFragment * ENCRYPTION_DATA_UNIT_SIZE; + fragmentData += unitsPerFragment * sectorSize; fragmentStartUnitNo += unitsPerFragment; if (remainder > 0 && --remainder == 0) -- cgit v1.2.3