Changeset 6965
- Timestamp:
- Oct 27, 2008, 4:27:55 AM (12 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r6961 r6965 868 868 const uint32_t offset = getBlockOffsetInPiece( tor, block ); 869 869 const uint32_t length = tr_torBlockCountBytes( tor, block ); 870 871 assert( tr_torrentReqIsValid( tor, index, offset, length ) );872 assert( offset < tr_torPieceCountBytes( tor, index ) );873 assert( (offset + length) <= tr_torPieceCountBytes( tor, index ) );874 870 875 871 /* find a peer who can ask for this block */ -
trunk/libtransmission/torrent.c
r6935 r6965 1556 1556 if( index >= tor->info.pieceCount ) 1557 1557 err = 1; 1558 else if( offset>= tr_torPieceCountBytes( tor, index ) )1558 else if( ( offset + length ) >= tr_torPieceCountBytes( tor, index ) ) 1559 1559 err = 2; 1560 1560 else if( length > MAX_BLOCK_SIZE ) 1561 1561 err = 3; 1562 else if( tr_pieceOffset( tor, index, offset, 1563 length ) > tor->info.totalSize ) 1562 else if( tr_pieceOffset( tor, index, offset, length ) > tor->info.totalSize ) 1564 1563 err = 4; 1565 1564
Note: See TracChangeset
for help on using the changeset viewer.