apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1361811 - /apr/apr/trunk/crypto/apr_passwd.c
Date Sun, 15 Jul 2012 21:44:55 GMT
Author: sf
Date: Sun Jul 15 21:44:55 2012
New Revision: 1361811

URL: http://svn.apache.org/viewvc?rev=1361811&view=rev
Log:
Increase the buffer size for the hashed string

sha512-crypt with custom rounds= prefix needs 115 bytes plus length of the
number of rounds string to store the resulting hash. An usable buffer size of
119 limited this to 9999 rounds.

Use 200 to allow for future hash algorithms with longer string lengths (e.g.
due to longer salt).

Modified:
    apr/apr/trunk/crypto/apr_passwd.c

Modified: apr/apr/trunk/crypto/apr_passwd.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/crypto/apr_passwd.c?rev=1361811&r1=1361810&r2=1361811&view=diff
==============================================================================
--- apr/apr/trunk/crypto/apr_passwd.c (original)
+++ apr/apr/trunk/crypto/apr_passwd.c Sun Jul 15 21:44:55 2012
@@ -99,7 +99,7 @@ static void crypt_mutex_unlock()
 APR_DECLARE(apr_status_t) apr_password_validate(const char *passwd, 
                                                 const char *hash)
 {
-    char sample[120];
+    char sample[200];
 #if !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
     char *crypt_pw;
 #endif



Mime
View raw message