Changeset 2531 for trunk/libtransmission/peerparse.h
- Timestamp:
- Jul 28, 2007, 3:43:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peerparse.h
r2496 r2531 224 224 return TR_ERROR_ASSERT; 225 225 } 226 if( tr_ pieceSize(index ) < begin + length )226 if( tr_torPieceCountBytes( tor, index ) < begin + length ) 227 227 { 228 228 peer_dbg( "GET request, invalid begin/length" ); … … 302 302 return TR_ERROR_ASSERT; 303 303 } 304 if( tr_ pieceSize(index ) < begin + len - 8 )304 if( tr_torPieceCountBytes( tor, index ) < begin + len - 8 ) 305 305 { 306 306 peer_dbg( "GET piece, invalid begin/length" ); … … 316 316 317 317 /* Sanity checks */ 318 if( len - 8 != tr_ blockSize(block ) )319 { 320 peer_dbg( "wrong size (expecting %d)", tr_ blockSize(block ) );318 if( len - 8 != tr_torBlockCountBytes( tor, block ) ) 319 { 320 peer_dbg( "wrong size (expecting %d)", tr_torBlockCountBytes( tor, block ) ); 321 321 return TR_ERROR_ASSERT; 322 322 } … … 406 406 return TR_ERROR_ASSERT; 407 407 } 408 if( tr_ pieceSize(index ) < begin + length )408 if( tr_torPieceCountBytes( tor, index ) < begin + length ) 409 409 { 410 410 peer_dbg( "GET cancel, invalid begin/length" );
Note: See TracChangeset
for help on using the changeset viewer.