Changeset 2494


Ignore:
Timestamp:
Jul 25, 2007, 5:19:29 PM (15 years ago)
Author:
charles
Message:

fix double-free crash on opening a corrupt torrent file. reported by wereHamster

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/metainfo.c

    r2358 r2494  
    306306    }
    307307    tr_free( inf->trackerList );
     308
     309    memset( inf, '\0', sizeof(tr_info_t) );
    308310}
    309311
  • trunk/libtransmission/torrent.c

    r2489 r2494  
    344344        ret = infoCanAdd( h, destination, setme_info );
    345345
    346     if( setme_info == &tmp )
     346    /* if we allocated a temporary info, free it */
     347    if( !ret && ( setme_info == &tmp ) )
    347348        tr_metainfoFree( &tmp );
    348349
Note: See TracChangeset for help on using the changeset viewer.