From ae7ec4802a81770ff164e465b8d1fb51624ca093 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 7 Feb 2016 02:07:38 +0100 Subject: Windows:Fix various issues and warnings reported by static code analysis tool Coverity. --- src/ExpandVolume/DlgExpandVolume.cpp | 2 +- src/ExpandVolume/WinMain.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ExpandVolume') diff --git a/src/ExpandVolume/DlgExpandVolume.cpp b/src/ExpandVolume/DlgExpandVolume.cpp index 135f8d48..73a38b59 100644 --- a/src/ExpandVolume/DlgExpandVolume.cpp +++ b/src/ExpandVolume/DlgExpandVolume.cpp @@ -305,7 +305,7 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L SetDlgItemText(hwndDlg, IDC_BOX_STATUS, L"IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the encryption keys. Then click 'Continue' to expand the volume."); } - SendMessage (GetDlgItem (hwndDlg, IDC_DISPLAY_POOL_CONTENTS), BM_SETCHECK, showRandPool ? BST_CHECKED : BST_UNCHECKED, 0); + SendMessage (GetDlgItem (hwndDlg, IDC_DISPLAY_POOL_CONTENTS), BM_SETCHECK, BST_UNCHECKED, 0); hEntropyBar = GetDlgItem (hwndDlg, IDC_ENTROPY_BAR); SendMessage (hEntropyBar, PBM_SETRANGE32, 0, maxEntropyLevel); SendMessage (hEntropyBar, PBM_SETSTEP, 1, 0); diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index 89d1738d..e6efd1db 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -759,7 +759,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA KeyFile *kf = (KeyFile *) malloc (sizeof (KeyFile)); if (kf) { - DragQueryFile (hdrop, i++, kf->FileName, sizeof (kf->FileName)); + DragQueryFile (hdrop, i++, kf->FileName, ARRAYSIZE (kf->FileName)); FirstKeyFile = KeyFileAdd (FirstKeyFile, kf); KeyFilesEnable = TRUE; } -- cgit v1.2.3