Ignore:
Timestamp:
Sep 6, 2008, 7:26:25 AM (13 years ago)
Author:
muks
Message:

(win32) Stack smash test fails with too much depth on win32

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode-test.c

    r6615 r6728  
    341341
    342342static int
    343 testStackSmash( void )
     343testStackSmash( int depth )
    344344{
    345345    int i;
    346346    int len;
    347     int depth;
    348347    int err;
    349348    uint8_t * in;
     
    352351    char * saved;
    353352
    354     depth = 1000000;
    355353    in = tr_new( uint8_t, depth*2 + 1 );
    356354    for( i=0; i<depth; ++i ) {
     
    389387        return i;
    390388
    391     if(( i = testStackSmash( )))
    392         return i;
    393 
    394     return 0;
    395 }
     389#ifndef WIN32
     390    i = testStackSmash( 1000000 );
     391#else
     392    i = testStackSmash( 100000 );
     393#endif
     394    if( i )
     395        return i;
     396
     397    return 0;
     398}
Note: See TracChangeset for help on using the changeset viewer.