Changeset 9878


Ignore:
Timestamp:
Jan 4, 2010, 10:52:53 PM (12 years ago)
Author:
charles
Message:

(1.7x libT) backport to 1.7x branch: r9855 #2709 "an invalid torrent-add RPC request can crash Transmission"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7x/libtransmission/torrent.c

    r9871 r9878  
    16381638
    16391639    for( i = 0; i < fileCount; ++i )
    1640         tr_torrentInitFilePriority( tor, files[i], priority );
     1640        if( files[i] < tor->info.fileCount )
     1641            tr_torrentInitFilePriority( tor, files[i], priority );
    16411642
    16421643    tr_torrentSetDirty( tor );
     
    17671768
    17681769    for( i=0; i<fileCount; ++i )
    1769         setFileDND( tor, files[i], doDownload );
     1770        if( files[i] < tor->info.fileCount )
     1771            setFileDND( tor, files[i], doDownload );
     1772
    17701773    tr_cpInvalidateDND( &tor->completion );
    17711774    tor->needsSeedRatioCheck = TRUE;
Note: See TracChangeset for help on using the changeset viewer.