Changeset 12463


Ignore:
Timestamp:
May 27, 2011, 11:28:40 PM (10 years ago)
Author:
jordan
Message:

(trunk libT) #4284 "crash via webfrontend or transmission-remote" -- use patch from jerwied

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r12392 r12463  
    12661266jsonChildFunc( struct jsonWalk * data )
    12671267{
    1268     if( data->parents )
     1268    if( data->parents && data->parents->data )
    12691269    {
    12701270        struct ParentState * parentState = data->parents->data;
     
    13731373    const unsigned char * it = (const unsigned char *) getStr(val);
    13741374    const unsigned char * end = it + val->val.s.len;
    1375     const int safeguard = 512; /* arbitrary margin for escapes and unicode */
    1376 
    1377     evbuffer_reserve_space( data->out, val->val.s.len+safeguard, vec, 1 );
     1375
     1376    evbuffer_reserve_space( data->out, val->val.s.len * 4, vec, 1 );
    13781377    out = vec[0].iov_base;
    13791378    outend = out + vec[0].iov_len;
Note: See TracChangeset for help on using the changeset viewer.