tighten fuzz size limits

we are still seeing timeouts
This commit is contained in:
John Cupitt 2019-10-30 08:57:46 +00:00
parent acb68c867a
commit 7c5971392c
8 changed files with 27 additions and 43 deletions

View File

@ -17,11 +17,9 @@ LLVMFuzzerTestOneInput( const guint8 *data, size_t size )
if( !(image = vips_image_new_from_buffer( data, size, "", NULL )) )
return( 0 );
/* Skip big images. They are likely to timeout.
*/
if( image->Xsize > 1024 ||
image->Ysize > 1024 ||
image->Bands > 10 ) {
if( image->Xsize > 100 ||
image->Ysize > 100 ||
image->Bands > 4 ) {
g_object_unref( image );
return( 0 );
}

View File

@ -19,11 +19,9 @@ test_one_file( const char *name )
NULL )) )
return( 0 );
/* Skip big images. They are likely to timeout.
*/
if( image->Xsize > 1024 ||
image->Ysize > 1024 ||
image->Bands > 10 ) {
if( image->Xsize > 100 ||
image->Ysize > 100 ||
image->Bands > 4 ) {
g_object_unref( image );
return( 0 );
}

View File

@ -28,11 +28,9 @@ LLVMFuzzerTestOneInput( const guint8 *data, size_t size )
if( !(ref = vips_image_new_from_buffer( data, size, "", NULL )) )
return( 0 );
/* Skip big images. They are likely to timeout.
*/
if( ref->Xsize > 1024 ||
ref->Ysize > 1024 ||
ref->Bands > 10 ) {
if( ref->Xsize > 100 ||
ref->Ysize > 100 ||
ref->Bands > 4 ) {
g_object_unref( ref );
return( 0 );
}

View File

@ -17,11 +17,9 @@ LLVMFuzzerTestOneInput( const guint8 *data, size_t size )
if( !(image = vips_image_new_from_buffer( data, size, "", NULL )) )
return( 0 );
/* Skip big images. They are likely to timeout.
*/
if( image->Xsize > 1024 ||
image->Ysize > 1024 ||
image->Bands > 10 ) {
if( image->Xsize > 100 ||
image->Ysize > 100 ||
image->Bands > 4 ) {
g_object_unref( image );
return( 0 );
}

View File

@ -16,11 +16,9 @@ LLVMFuzzerTestOneInput( const guint8 *data, size_t size )
if( !(image = vips_image_new_from_buffer( data, size, "", NULL )) )
return( 0 );
/* Skip big images. They are likely to timeout.
*/
if( image->Xsize > 1024 ||
image->Ysize > 1024 ||
image->Bands > 10 ) {
if( image->Xsize > 100 ||
image->Ysize > 100 ||
image->Bands > 4 ) {
g_object_unref( image );
return( 0 );
}

View File

@ -16,11 +16,9 @@ LLVMFuzzerTestOneInput( const guint8 *data, size_t size )
if( !(image = vips_image_new_from_buffer( data, size, "", NULL )) )
return( 0 );
/* Skip big images. They are likely to timeout.
*/
if( image->Xsize > 1024 ||
image->Ysize > 1024 ||
image->Bands > 10 ) {
if( image->Xsize > 100 ||
image->Ysize > 100 ||
image->Bands > 4 ) {
g_object_unref( image );
return( 0 );
}

View File

@ -16,11 +16,9 @@ LLVMFuzzerTestOneInput( const guint8 *data, size_t size )
if( !(image = vips_image_new_from_buffer( data, size, "", NULL )) )
return( 0 );
/* Skip big images. They are likely to timeout.
*/
if( image->Xsize > 1024 ||
image->Ysize > 1024 ||
image->Bands > 10 ) {
if( image->Xsize > 100 ||
image->Ysize > 100 ||
image->Bands > 4 ) {
g_object_unref( image );
return( 0 );
}

View File

@ -17,11 +17,9 @@ LLVMFuzzerTestOneInput( const guint8 *data, size_t size )
if( !(image = vips_image_new_from_buffer( data, size, "", NULL )) )
return( 0 );
/* Skip big images. They are likely to timeout.
*/
if( image->Xsize > 1024 ||
image->Ysize > 1024 ||
image->Bands > 10 ) {
if( image->Xsize > 100 ||
image->Ysize > 100 ||
image->Bands > 4 ) {
g_object_unref( image );
return( 0 );
}