Changeset 9855


Ignore:
Timestamp:
Jan 3, 2010, 5:21:10 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #2709 "RPC files-unwanted" out-of-bounds access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r9847 r9855  
    17081708
    17091709    for( i = 0; i < fileCount; ++i )
    1710         tr_torrentInitFilePriority( tor, files[i], priority );
     1710        if( files[i] < tor->info.fileCount )
     1711            tr_torrentInitFilePriority( tor, files[i], priority );
    17111712    tr_torrentSetDirty( tor );
    17121713    tr_peerMgrRebuildRequests( tor );
     
    18381839
    18391840    for( i=0; i<fileCount; ++i )
    1840         setFileDND( tor, files[i], doDownload );
     1841        if( files[i] < tor->info.fileCount )
     1842            setFileDND( tor, files[i], doDownload );
     1843
    18411844    tr_cpInvalidateDND( &tor->completion );
    18421845    tor->needsSeedRatioCheck = TRUE;
Note: See TracChangeset for help on using the changeset viewer.