diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2021-07-13 21:59:48 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2021-07-13 22:08:02 +0200 |
commit | c3747824367dbcbe74777c166b6d5d41d6de5dce (patch) | |
tree | f081557b6fd3fd5d572682f8397fad03fdfb148e /src/ExpandVolume | |
parent | dce6d76b811f736e224550b22421ec1b963d5bd4 (diff) | |
download | VeraCrypt-c3747824367dbcbe74777c166b6d5d41d6de5dce.tar.gz VeraCrypt-c3747824367dbcbe74777c166b6d5d41d6de5dce.zip |
Windows: replace insecure wcscpy/wcscat/strcpy runtime functions with secure equivalents
This fixed failure to build driver for ARM64 with latest VS 2019
Diffstat (limited to 'src/ExpandVolume')
-rw-r--r-- | src/ExpandVolume/ExpandVolume.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ExpandVolume/ExpandVolume.c b/src/ExpandVolume/ExpandVolume.c index e340a8bb..84f6cfe8 100644 --- a/src/ExpandVolume/ExpandVolume.c +++ b/src/ExpandVolume/ExpandVolume.c @@ -37,6 +37,7 @@ #include "InitDataArea.h" #include "ExpandVolume.h" #include "Resource.h" +#include <strsafe.h> #ifndef SRC_POS #define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__)) @@ -526,7 +527,7 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas if (bDevice == FALSE) { - wcscpy (szCFDevice, szDiskFile); + StringCchCopyW (szCFDevice, ARRAYSIZE(szCFDevice), szDiskFile); } else { |