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:
parent
ba7dae1678
commit
be77238af4
1 changed files with 5 additions and 2 deletions
|
@ -1707,6 +1707,7 @@ tr_torrentSetFilePriorities( tr_torrent * tor,
|
|||
tr_torrentLock( tor );
|
||||
|
||||
for( i = 0; i < fileCount; ++i )
|
||||
if( files[i] < tor->info.fileCount )
|
||||
tr_torrentInitFilePriority( tor, files[i], priority );
|
||||
tr_torrentSetDirty( tor );
|
||||
tr_peerMgrRebuildRequests( tor );
|
||||
|
@ -1837,7 +1838,9 @@ tr_torrentInitFileDLs( tr_torrent * tor,
|
|||
tr_torrentLock( tor );
|
||||
|
||||
for( i=0; i<fileCount; ++i )
|
||||
if( files[i] < tor->info.fileCount )
|
||||
setFileDND( tor, files[i], doDownload );
|
||||
|
||||
tr_cpInvalidateDND( &tor->completion );
|
||||
tor->needsSeedRatioCheck = TRUE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue