mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
(win32) Stack smash test fails with too much depth on win32
This commit is contained in:
parent
0207d12f65
commit
64c9e8aabc
1 changed files with 7 additions and 4 deletions
|
@ -340,18 +340,16 @@ testJSON( void )
|
|||
}
|
||||
|
||||
static int
|
||||
testStackSmash( void )
|
||||
testStackSmash( int depth )
|
||||
{
|
||||
int i;
|
||||
int len;
|
||||
int depth;
|
||||
int err;
|
||||
uint8_t * in;
|
||||
const uint8_t * end;
|
||||
tr_benc val;
|
||||
char * saved;
|
||||
|
||||
depth = 1000000;
|
||||
in = tr_new( uint8_t, depth*2 + 1 );
|
||||
for( i=0; i<depth; ++i ) {
|
||||
in[i] = 'l';
|
||||
|
@ -388,7 +386,12 @@ main( void )
|
|||
if(( i = testJSON( )))
|
||||
return i;
|
||||
|
||||
if(( i = testStackSmash( )))
|
||||
#ifndef WIN32
|
||||
i = testStackSmash( 1000000 );
|
||||
#else
|
||||
i = testStackSmash( 100000 );
|
||||
#endif
|
||||
if( i )
|
||||
return i;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue