Changeset 10641


Ignore:
Timestamp:
May 11, 2010, 3:30:30 PM (11 years ago)
Author:
charles
Message:

(trunk libT) #3204 "crash in tr_torrentGetMagnetLink() when the torrent doesn't have a display name yet" -- fixed in trunk for 2.00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent-magnet.c

    r10502 r10641  
    307307    int i;
    308308    char * ret;
     309    const char * name;
    309310    struct evbuffer * s;
    310311
     
    313314    s = evbuffer_new( );
    314315    evbuffer_add_printf( s, "magnet:?xt=urn:btih:%s", tor->info.hashString );
    315     evbuffer_add_printf( s, "%s", "&dn=" );
    316     tr_http_escape( s, tr_torrentName( tor ), -1, TRUE );
     316    name = tr_torrentName( tor );
     317    if( name && *name )
     318    {
     319        evbuffer_add_printf( s, "%s", "&dn=" );
     320        tr_http_escape( s, tr_torrentName( tor ), -1, TRUE );
     321    }
    317322    for( i=0; i<tor->info.trackerCount; ++i )
    318323    {
Note: See TracChangeset for help on using the changeset viewer.