diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-02-10 00:21:15 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-02-10 02:23:18 +0100 |
commit | c1d670fd752b96abac09b919d7ca1bff4ebafcbc (patch) | |
tree | 27c927e9dc15e6d528aa3475b653bd0381031b83 /src/Mount | |
parent | a7b61ce5e5a0d0d5ab2814d59e832c169e1b845f (diff) | |
download | VeraCrypt-c1d670fd752b96abac09b919d7ca1bff4ebafcbc.tar.gz VeraCrypt-c1d670fd752b96abac09b919d7ca1bff4ebafcbc.zip |
Windows: Fix warnings reported by Coverity static code analyzer
Diffstat (limited to 'src/Mount')
-rw-r--r-- | src/Mount/Mount.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index c95129f6..ca322280 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -5157,7 +5157,14 @@ static BOOL Dismount (HWND hwndDlg, int nDosDriveNo) WaitCursor (); if (nDosDriveNo == -2) + { nDosDriveNo = (char) (HIWORD (GetSelectedLong (GetDlgItem (hwndDlg, IDC_DRIVELIST))) - L'A'); + if (nDosDriveNo < 0 || nDosDriveNo >= 26) + { + NormalCursor (); + return FALSE; + } + } if (bCloseDismountedWindows) { |