Changeset 3881


Ignore:
Timestamp:
Nov 19, 2007, 4:51:06 AM (15 years ago)
Author:
charles
Message:

add more asserts up the call chain to find the source of pea_ and Gimp's bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-msgs.c

    r3872 r3881  
    10481048{
    10491049    struct peer_request * req = &msgs->incoming.blockReq;
     1050    assert( EVBUFFER_LENGTH(inbuf) >= inlen );
    10501051    dbgmsg( msgs, "In readBtPiece" );
    10511052
     
    10691070        size_t n = MIN( nLeft, inlen );
    10701071        uint8_t * buf = tr_new( uint8_t, n );
     1072        assert( EVBUFFER_LENGTH(inbuf) >= n );
    10711073        tr_peerIoReadBytes( msgs->io, inbuf, buf, n );
    10721074        evbuffer_add( msgs->incoming.block, buf, n );
Note: See TracChangeset for help on using the changeset viewer.