VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2022-01-16 16:40:49 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2022-01-16 16:40:49 +0100
commit8eada1f8c6ed0f3429324fc80239a011fb634e3e (patch)
tree21eac48ac68e8a71902c5d6419a4231c1406dd45 /src
parent594a8d27063c62425b039965c8174d65fe0addd0 (diff)
downloadVeraCrypt-8eada1f8c6ed0f3429324fc80239a011fb634e3e.tar.gz
VeraCrypt-8eada1f8c6ed0f3429324fc80239a011fb634e3e.zip
Windows: Fix build error following merge
Diffstat (limited to 'src')
-rw-r--r--src/Format/Tcformat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 30f35257..09ea91f7 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -11045,7 +11045,7 @@ BOOL CALLBACK AdvanceDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
for (ea = EAGetFirst (); ea != 0; ea = EAGetNext (ea))
{
if (EAIsFormatEnabled (ea) && (!SysEncInEffect () || bSystemIsGPT || EAIsMbrSysEncEnabled (ea)))
- AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX), EAGetName (buf, ea, 1), ea);
+ AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX), EAGetName (buf, ARRAYSIZE(buf), ea, 1), ea);
}
SelectAlgo (GetDlgItem (hwndDlg, IDC_COMBO_BOX), &nVolumeEA);
@@ -11405,7 +11405,7 @@ BOOL CheckWord (char* search)
Error ("ERROR_GETTING_PATH", MainDlg);
}
- wcsncpy(tmp, path, wcslen(path));
+ StringCbCopyW(tmp, ARRAYSIZE(tmp), path);
//detects the last '\' in order to remove the name of the exe file. Afterwards add .txt file in the path
for (int i = wcslen(path); i > 1; i--)
@@ -11419,7 +11419,7 @@ BOOL CheckWord (char* search)
break;
}
}
- destPathName = wcscat(tmp, destFileName);
+ StringCbCatW(tmp, sizeof(tmp), destFileName);
std::ifstream fin(destPathName);
std::copy(std::istream_iterator<std::string>(fin), std::istream_iterator<std::string>(),