(trunk libT) #4473 'underflow from malformed ssha1 can crash tr_ssha1_matches()' -- bah, fix oops in r12884.
This commit is contained in:
parent
bb59768557
commit
e2240e0831
|
@ -382,7 +382,7 @@ tr_ssha1_matches( const char * source, const char * pass )
|
|||
/* extract the salt */
|
||||
if( sourcelen < 2*SHA_DIGEST_LENGTH-1 )
|
||||
return false;
|
||||
saltlen = sourcelen - SHA_DIGEST_LENGTH-1;
|
||||
saltlen = sourcelen - 2*SHA_DIGEST_LENGTH-1;
|
||||
salt = tr_malloc( saltlen );
|
||||
memcpy( salt, source + 2*SHA_DIGEST_LENGTH+1, saltlen );
|
||||
|
||||
|
|
Loading…
Reference in New Issue