From c3747824367dbcbe74777c166b6d5d41d6de5dce Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 13 Jul 2021 21:59:48 +0200 Subject: Windows: replace insecure wcscpy/wcscat/strcpy runtime functions with secure equivalents This fixed failure to build driver for ARM64 with latest VS 2019 --- src/Common/Password.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Common/Password.c') 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 @@ -23,6 +23,7 @@ #include "Random.h" #include +#include #ifndef SRC_POS #define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__)) @@ -210,7 +211,7 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5, if (bDevice == FALSE) { - wcscpy (szCFDevice, szDiskFile); + StringCchCopyW (szCFDevice, ARRAYSIZE(szCFDevice), szDiskFile); } else { -- cgit v1.2.3