VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-10-24 06:43:05 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-11-08 22:24:09 (GMT)
commitea03100d9e6988f6c8c2792f2e829b450a3bdf2c (patch)
tree48efb2fd183ecf03b3dcbe8398680af7692d1285 /src/Volume
parent067394d110ad712963f895cf63ae4a12ca4c0df1 (diff)
downloadVeraCrypt-ea03100d9e6988f6c8c2792f2e829b450a3bdf2c.zip
VeraCrypt-ea03100d9e6988f6c8c2792f2e829b450a3bdf2c.tar.gz
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.
Diffstat (limited to 'src/Volume')
-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 6635df7..9d39570 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)