You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2016/12/19 01:53:30 UTC
svn commit: r1774976 - /apr/apr/trunk/crypto/crypt_blowfish.c
Author: ylavic
Date: Mon Dec 19 01:53:30 2016
New Revision: 1774976
URL: http://svn.apache.org/viewvc?rev=1774976&view=rev
Log:
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().
Modified:
apr/apr/trunk/crypto/crypt_blowfish.c
Modified: apr/apr/trunk/crypto/crypt_blowfish.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/crypto/crypt_blowfish.c?rev=1774976&r1=1774975&r2=1774976&view=diff
==============================================================================
--- apr/apr/trunk/crypto/crypt_blowfish.c (original)
+++ apr/apr/trunk/crypto/crypt_blowfish.c Mon Dec 19 01:53:30 2016
@@ -684,8 +684,7 @@ static char *BF_crypt(const char *key, c
}
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;
}