VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Password.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r--src/Common/Password.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c
index f2413b6d..4caf3a21 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -22,8 +22,9 @@
#include "Endian.h"
#include "Random.h"
#include <io.h>
+#include <strsafe.h>
#ifndef SRC_POS
#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
#endif
@@ -209,9 +210,9 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
CreateFullVolumePath (szDiskFile, sizeof(szDiskFile), lpszVolume, &bDevice);
if (bDevice == FALSE)
{
- wcscpy (szCFDevice, szDiskFile);
+ StringCchCopyW (szCFDevice, ARRAYSIZE(szCFDevice), szDiskFile);
}
else
{
nDosLinkCreated = FakeDosNameForDevice (szDiskFile, szDosDevice, sizeof(szDosDevice), szCFDevice, sizeof(szCFDevice),FALSE);