apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1774976 - /apr/apr/trunk/crypto/crypt_blowfish.c
Date Mon, 19 Dec 2016 01:53:30 GMT
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;
 	}



Mime
View raw message