diff options
Diffstat (limited to 'oss-fuzz')
-rw-r--r-- | oss-fuzz/fuzzer_encoder.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/oss-fuzz/fuzzer_encoder.cc b/oss-fuzz/fuzzer_encoder.cc index b4f25ec7..6d230122 100644 --- a/oss-fuzz/fuzzer_encoder.cc +++ b/oss-fuzz/fuzzer_encoder.cc @@ -139,16 +139,22 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { fuzzing::memory::memory_test(res); } - if ( size > 2 * 65535 ) { + if ( size > 2 * 65535 * 4 ) { /* With large inputs and expensive options enabled, the fuzzer can get *really* slow. * Some combinations can make the fuzzer timeout (>60 seconds). However, while combining * options makes the fuzzer slower, most options do not expose new code when combined. * Therefore, combining slow options is disabled for large inputs. Any input containing - * more than 65536 * 2 samples (max blocksize, stereo) is considered large + * more than 65536 * 2 samples of 32 bits each (max blocksize, stereo) is considered large */ encoder.set_do_qlp_coeff_prec_search(false); encoder.set_do_exhaustive_model_search(false); } + if ( size > 2 * 4096 * 4 + 250 ) { + /* With subdivide_tukey in the mix testing apodizations can get really expensive. Therefore + * this is disabled for inputs of more than one whole stereo block of 32-bit inputs plus a + * bit of overhead */ + encoder.set_apodization(""); + } { ::FLAC__StreamEncoderInitStatus ret; |