VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-10-24 08:43:05 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-11-08 23:24:09 +0100
commitea03100d9e6988f6c8c2792f2e829b450a3bdf2c (patch)
tree48efb2fd183ecf03b3dcbe8398680af7692d1285
parent067394d110ad712963f895cf63ae4a12ca4c0df1 (diff)
downloadVeraCrypt-ea03100d9e6988f6c8c2792f2e829b450a3bdf2c.tar.gz
VeraCrypt-ea03100d9e6988f6c8c2792f2e829b450a3bdf2c.zip
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.
-rw-r--r--src/Volume/EncryptionThreadPool.cpp2
1 files changed, 1 insertions, 1 deletions
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)