Commit Graph

5 Commits

Author SHA1 Message Date
Martijn van Beurden 383b77fa08 Let fuzzer_encoder_v2 use tmp files to improve coverage 2022-05-19 20:22:09 +02:00
Martijn van Beurden becba351f0 Make it possible for fuzzer to disable instruction set optimizations
This should greatly increase code coverage of the encoder fuzzer
2022-05-11 10:34:49 +02:00
Martijn van Beurden 87a5f3e952 Add abort on encoding error that should not happen
This commit lets the following errors trigger an abort:
- FLAC__STREAM_ENCODER_OGG_ERROR
- FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR
- FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA
- FLAC__STREAM_ENCODER_IO_ERROR
- FLAC__STREAM_ENCODER_FRAMING_ERROR
- FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR

FLAC__STREAM_ENCODER_CLIENT_ERROR does not trigger an abort because
it is used to signal invalid input. FLAC__STREAM_ENCODER_UNINITIALIZED
does not trigger an abort because init fails when invalid parameters
are given
2022-05-11 10:34:49 +02:00
Martijn van Beurden b64ea1171b Fix fuzzer_encoder_v2 timeouts
This fixes the 'false positive' oss-fuzz bug filed under
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47264

The fuzzer was timing out because of an enormous input (932kB)
combined with very slow settings. The commit disables certain
slow settings on inputs larger than 2^18 byte.
2022-05-07 21:58:40 +02:00
Martijn van Beurden b52734242e Add fuzzer_encoder_v2
Add additional fuzzer for the encoder, aiming to reach more coverage
than the current encoder fuzzer. This is done by incorporating
metadata handling and fixing a problem with different settings in
the current fuzzer
2022-04-30 21:20:50 +02:00