summaryrefslogtreecommitdiff
path: root/crypto/crypt_blowfish.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2016-12-19 01:53:30 +0000
committerYann Ylavic <ylavic@apache.org>2016-12-19 01:53:30 +0000
commit0f64ee735c61a599649c8cc47f76e6a904461cd0 (patch)
treedabb77104b4aa12649730b628df37252b12fefe8 /crypto/crypt_blowfish.c
parent0247612a6c10fb8d74ee23e6166a4c92323f8a92 (diff)
downloadapr-0f64ee735c61a599649c8cc47f76e6a904461cd0.tar.gz
apr_crypto: blowfish: revert r1773929.
Wrong place for this check, and wrong value too (should be 1 << 17). But actually the max is already caped by _crypt_gensalt_blowfish_rn() which is necessarily called previously in apr_bcrypt_encode(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1774976 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'crypto/crypt_blowfish.c')
-rw-r--r--crypto/crypt_blowfish.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/crypt_blowfish.c b/crypto/crypt_blowfish.c
index 23580c2b4..013c1ed82 100644
--- a/crypto/crypt_blowfish.c
+++ b/crypto/crypt_blowfish.c
@@ -684,8 +684,7 @@ static char *BF_crypt(const char *key, const char *setting,
}
count = (BF_word)1 << ((setting[4] - '0') * 10 + (setting[5] - '0'));
- if (count < min || count > 17 ||
- BF_decode(data.binary.salt, &setting[7], 16)) {
+ if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
__set_errno(EINVAL);
return NULL;
}