diff options
author | Technion <technion@lolware.net> | 2015-07-09 10:59:57 +0000 |
---|---|---|
committer | Technion <technion@lolware.net> | 2015-07-09 10:59:57 +0000 |
commit | 5d641a8170a08e9e2dff2b6832511d99d85b735c (patch) | |
tree | db9d9d8a92c9d24b6900b2137d986263900f59fe | |
parent | c2f357d45856df73d15d28965ecd5f5ae3eb3fd2 (diff) |
Fix possible (API misuse) null pointer reported by Coverity.
-rw-r--r-- | crypto_scrypt-check.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto_scrypt-check.c b/crypto_scrypt-check.c index 99477ff..8ea4519 100644 --- a/crypto_scrypt-check.c +++ b/crypto_scrypt-check.c @@ -33,6 +33,11 @@ int libscrypt_check(char *mcf, const char *password) uint8_t salt[32]; char *tok; + if(mcf == NULL) + { + return -1; + } + if(memcmp(mcf, SCRYPT_MCF_ID, 3) != 0) { /* Only version 0 supported */ |