mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
(trunk libT) fix off-by-one in tr_ssha1() reported by lightix @ http://forum.transmissionbt.com/viewtopic.php?f=2&t=7684#p37556
This commit is contained in:
parent
89b37faa2a
commit
cd36431b0c
1 changed files with 1 additions and 1 deletions
|
@ -375,7 +375,7 @@ tr_ssha1( const void * plaintext )
|
|||
uint8_t sha[SHA_DIGEST_LENGTH];
|
||||
char buf[2*SHA_DIGEST_LENGTH + saltval_len + 2];
|
||||
|
||||
for( i=0; i<=saltval_len; ++i )
|
||||
for( i=0; i<saltval_len; ++i )
|
||||
salt[i] = salter[ tr_cryptoRandInt( salter_len ) ];
|
||||
|
||||
tr_sha1( sha, plaintext, strlen( plaintext ), salt, saltval_len, NULL );
|
||||
|
|
Loading…
Reference in a new issue