VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Password.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-05 18:15:41 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-06 01:19:21 +0200
commit724043be0b9ed68382c49c54b4750ddeaebe81c4 (patch)
treef93ab6d2b1597b9fd2c3c354f0c730b805cc3c57 /src/Common/Password.c
parentc3b77fba25539c433c882d980169f2c68329e996 (diff)
downloadVeraCrypt-724043be0b9ed68382c49c54b4750ddeaebe81c4.tar.gz
VeraCrypt-724043be0b9ed68382c49c54b4750ddeaebe81c4.zip
Windows: Display source location of errors in order to help diagnose issues reported by users
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r--src/Common/Password.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c
index 3ae264d2..b3dd54bb 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -22,6 +22,10 @@
#include <io.h>
+#ifndef SRC_POS
+#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
+#endif
+
void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword,
HWND hVerify, unsigned char *szPassword,
char *szVerify,
@@ -160,14 +164,14 @@ int ChangePwd (const char *lpszVolume, Password *oldPassword, int old_pkcs5, int
if ((wipePassCount <= 0) || (truecryptMode && (old_pkcs5 == SHA256)))
{
nStatus = ERR_PARAMETER_INCORRECT;
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
return nStatus;
}
if (!lpszVolume)
{
nStatus = ERR_OUTOFMEMORY;
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
return nStatus;
}
@@ -451,7 +455,7 @@ error:
return nStatus;
if (nStatus != 0)
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
return nStatus;
}