Changeset 12915


Ignore:
Timestamp:
Sep 25, 2011, 9:51:50 PM (10 years ago)
Author:
jordan
Message:

(trunk libT) #4504 "crash when adding malformed magnet link" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/magnet.c

    r12204 r12915  
    150150            }
    151151
    152             if( ( keylen==2 ) && !memcmp( key, "dn", 2 ) )
     152            if( ( vallen > 0 ) && ( keylen==2 ) && !memcmp( key, "dn", 2 ) )
    153153                displayName = tr_http_unescape( val, vallen );
    154154
    155             if( trCount < MAX_TRACKERS ) {
     155            if( ( vallen > 0 ) && ( trCount < MAX_TRACKERS ) ) {
    156156                int i;
    157157                if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) )
Note: See TracChangeset for help on using the changeset viewer.