1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-13 18:04:43 +00:00

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

This commit is contained in:
Charles Kerr 2010-01-03 17:21:10 +00:00
parent ba7dae1678
commit be77238af4

View file

@ -1707,7 +1707,8 @@ tr_torrentSetFilePriorities( tr_torrent * tor,
tr_torrentLock( tor ); tr_torrentLock( tor );
for( i = 0; i < fileCount; ++i ) for( i = 0; i < fileCount; ++i )
tr_torrentInitFilePriority( tor, files[i], priority ); if( files[i] < tor->info.fileCount )
tr_torrentInitFilePriority( tor, files[i], priority );
tr_torrentSetDirty( tor ); tr_torrentSetDirty( tor );
tr_peerMgrRebuildRequests( tor ); tr_peerMgrRebuildRequests( tor );
@ -1837,7 +1838,9 @@ tr_torrentInitFileDLs( tr_torrent * tor,
tr_torrentLock( tor ); tr_torrentLock( tor );
for( i=0; i<fileCount; ++i ) for( i=0; i<fileCount; ++i )
setFileDND( tor, files[i], doDownload ); if( files[i] < tor->info.fileCount )
setFileDND( tor, files[i], doDownload );
tr_cpInvalidateDND( &tor->completion ); tr_cpInvalidateDND( &tor->completion );
tor->needsSeedRatioCheck = TRUE; tor->needsSeedRatioCheck = TRUE;