From c2b69b248c004e097ffc1aa4c0dde0ddd0ba54f7 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 15 Aug 2018 00:47:11 +0200 Subject: Windows: Add various checks and replace STL code after Coverity report --- src/Mount/Mount.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Mount') diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index da1d74f9..1d80e030 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -4634,7 +4634,11 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa } StringCbPrintfW (srcPath, sizeof(srcPath), L"%s\\Languages\\Language.%hs.xml", appDir, GetPreferredLangId ()); StringCbPrintfW (dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\Languages\\Language.%hs.xml", dstDir, GetPreferredLangId ()); - TCCopyFile (srcPath, dstPath); + if (!TCCopyFile (srcPath, dstPath)) + { + handleWin32Error (hwndDlg, SRC_POS); + goto stop; + } } // AutoRun -- cgit v1.2.3