Ignore:
Timestamp:
Jan 31, 2008, 2:24:43 AM (13 years ago)
Author:
charles
Message:

#667: remote crash exploit in bencode parser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/ptrarray.c

    r4404 r4876  
    9797}
    9898
     99void*
     100tr_ptrArrayBack( tr_ptrArray* t )
     101{
     102    assert( t->n_items > 0 );
     103
     104    return tr_ptrArrayNth( t, t->n_items-1 );
     105}
     106
    99107int
    100108tr_ptrArraySize( const tr_ptrArray * t )
     
    139147{
    140148    return tr_ptrArrayInsert( t, ptr, -1 );
     149}
     150
     151void*
     152tr_ptrArrayPop( tr_ptrArray* t )
     153{
     154    void * ret = NULL;
     155
     156    if( t->n_items )
     157        ret = t->items[--t->n_items];
     158   
     159    return ret;
    141160}
    142161
Note: See TracChangeset for help on using the changeset viewer.