Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/pwdstorage In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32566
Modified Files: ssha_pwd.c Log Message: 168322 - Check size of hash needed before base64 encoding password hashes
Index: ssha_pwd.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pwdstorage/ssha_pwd.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ssha_pwd.c 6 Sep 2005 21:15:15 -0000 1.6 +++ ssha_pwd.c 14 Sep 2005 23:37:37 -0000 1.7 @@ -175,14 +175,14 @@ }
if (( enc = slapi_ch_malloc( 3 + schemeNameLen + - LDIF_BASE64_LEN(sizeof(hash)))) == NULL ) { + LDIF_BASE64_LEN(shaLen + SHA_SALT_LENGTH))) == NULL ) { return( NULL ); }
sprintf( enc, "%c%s%c", PWD_HASH_PREFIX_START, schemeName, PWD_HASH_PREFIX_END ); (void)ldif_base64_encode( hash, enc + 2 + schemeNameLen, - sizeof(hash), -1 ); + (shaLen + SHA_SALT_LENGTH), -1 );
return( enc ); }
389-commits@lists.fedoraproject.org