[FFmpeg-devel] [PATCH 4/7] tools/target_dec_fuzzer: Set extradata for the parser

Michael Niedermayer michael at niedermayer.cc
Fri Feb 7 15:48:28 EET 2020


This should improve coverage

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 tools/target_dec_fuzzer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 2e718c2e95..f1768d4dce 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -266,6 +266,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         return 0; // Failure of avcodec_open2() does not imply that a issue was found
     }
     parser_avctx->codec_id = ctx->codec_id;
+    parser_avctx->extradata_size = ctx->extradata_size;
+    parser_avctx->extradata      = av_memdup(ctx->extradata, ctx->extradata_size);
+
 
     int got_frame;
     AVFrame *frame = av_frame_alloc();
-- 
2.17.1



More information about the ffmpeg-devel mailing list