Ignore:
Timestamp:
Nov 11, 2010, 3:31:11 PM (11 years ago)
Author:
charles
Message:

(trunk libT) add some new bugs to the code so that it will crash when vraa tries to use it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r11350 r11398  
    452452        if( ( *str == '%' ) && ( str[1] == '\'' ) )
    453453            str = str + 1;
    454  
     454
    455455    }
    456456    *out = '\0';
     
    12231223    const char zero = '\0';
    12241224    struct evbuffer * buf = evbuffer_new( );
    1225  
     1225
    12261226    while( !tr_utf8_validate( in, inlen, &end ) )
    12271227    {
     
    12331233        evbuffer_add( buf, "?", 1 );
    12341234    }
    1235  
     1235
    12361236    evbuffer_add( buf, in, inlen );
    12371237    evbuffer_add( buf, &zero, 1 );
     
    14381438    char * pt;
    14391439    char buf[128];
    1440     const int max_precision = (int) log10( 1.0 / DBL_EPSILON ) - 1; 
    1441     tr_snprintf( buf, sizeof( buf ), "%.*f", max_precision, x ); 
     1440    const int max_precision = (int) log10( 1.0 / DBL_EPSILON ) - 1;
     1441    tr_snprintf( buf, sizeof( buf ), "%.*f", max_precision, x );
    14421442    if(( pt = strstr( buf, localeconv()->decimal_point )))
    14431443        pt[precision ? precision+1 : 0] = '\0';
     
    16091609    uint64_t value;
    16101610};
    1611  
     1611
    16121612struct formatter_units
    16131613{
     
    17211721
    17221722unsigned int tr_mem_K = 0u;
    1723  
     1723
    17241724void
    17251725tr_formatter_mem_init( unsigned int kilo,
Note: See TracChangeset for help on using the changeset viewer.