summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechnion <technion@lolware.net>2014-12-01 09:17:48 +0000
committerTechnion <technion@lolware.net>2014-12-01 09:17:48 +0000
commitbd161172424af4627952d03412ee67142766d71c (patch)
treedc77255d27565892222b0e75df0283864dc40991
parent3d9500c4307963294bc09d76c1b9384249cbe6b1 (diff)
Because of commit 7cd8a4fa3, libscrypt_scrypt can return EINVAL, which is 22. Passing this from libscrypt_check incorrectly returns a failure as a success.
Reported by Achim Stahlberger.
-rw-r--r--crypto_scrypt-check.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto_scrypt-check.c b/crypto_scrypt-check.c
index 055717f..f198ef0 100644
--- a/crypto_scrypt-check.c
+++ b/crypto_scrypt-check.c
@@ -96,7 +96,7 @@ int libscrypt_check(char *mcf, const char *password)
(uint32_t)retval, N, r, p, hashbuf, sizeof(hashbuf));
if (retval != 0)
- return retval;
+ return -1;
retval = libscrypt_b64_encode((unsigned char*)hashbuf, sizeof(hashbuf),
outbuf, sizeof(outbuf));