tools/target_dec_fuzzer: Support fuzzing error detection
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 29 Nov 2019 23:59:20 +0000 (00:59 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 3 Dec 2019 15:06:20 +0000 (16:06 +0100)
This should increase coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tools/target_dec_fuzzer.c

index 1c4fb11..9dbe025 100644 (file)
@@ -194,6 +194,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
             parser = av_parser_init(c->id);
         if (flags & 2)
             ctx->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
+        if (flags & 4) {
+            ctx->err_recognition = AV_EF_AGGRESSIVE | AV_EF_COMPLIANT | AV_EF_CAREFUL;
+            if (flags & 8)
+                ctx->err_recognition |= AV_EF_EXPLODE;
+        }
+
 
         extradata_size = bytestream2_get_le32(&gbc);