diff options
Diffstat (limited to 'src/Format/InPlace.c')
-rw-r--r-- | src/Format/InPlace.c | 8 |
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 @@ -778,11 +778,11 @@ 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;
}
@@ -1243,11 +1243,11 @@ 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;
}
|