VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format
diff options
context:
space:
mode:
Diffstat (limited to 'src/Format')
-rw-r--r--src/Format/InPlace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Format/InPlace.c b/src/Format/InPlace.c
index a6b6abeb..720b9466 100644
--- a/src/Format/InPlace.c
+++ b/src/Format/InPlace.c
@@ -779,9 +779,9 @@ int EncryptPartitionInPlaceResume (HANDLE dev,
if (dev == INVALID_HANDLE_VALUE)
{
- StringCbCopyW (deviceName, sizeof(deviceName), devicePath);
+ StringCchCopyW (deviceName, ARRAYSIZE(deviceName), devicePath);
- if (FakeDosNameForDevice (devicePath, dosDev, sizeof(dosDev),devName, sizeof(devName),FALSE) != 0)
+ if (FakeDosNameForDevice (deviceName, dosDev, sizeof(dosDev),devName, sizeof(devName),FALSE) != 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
@@ -1244,9 +1244,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
}
- StringCbCopyW (deviceName, sizeof(deviceName), devicePath);
+ StringCchCopyW (deviceName, ARRAYSIZE(deviceName), devicePath);
- if (FakeDosNameForDevice (devicePath, dosDev, sizeof(dosDev), devName, sizeof(devName), FALSE) != 0)
+ if (FakeDosNameForDevice (deviceName, dosDev, sizeof(dosDev), devName, sizeof(devName), FALSE) != 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;