mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
(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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue