Changeset 12885


Ignore:
Timestamp:
Sep 16, 2011, 10:55:58 PM (10 years ago)
Author:
jordan
Message:

(trunk libT) #4473 'underflow from malformed ssha1 can crash tr_ssha1_matches()' -- bah, fix oops in r12884.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/crypto.c

    r12884 r12885  
    383383    if( sourcelen < 2*SHA_DIGEST_LENGTH-1 )
    384384        return false;
    385     saltlen = sourcelen - SHA_DIGEST_LENGTH-1;
     385    saltlen = sourcelen - 2*SHA_DIGEST_LENGTH-1;
    386386    salt = tr_malloc( saltlen );
    387387    memcpy( salt, source + 2*SHA_DIGEST_LENGTH+1, saltlen );
Note: See TracChangeset for help on using the changeset viewer.