diff mbox series

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

Message ID 20200207134831.23137-4-michael@niedermayer.cc
State Accepted
Commit a0fd56f55e12427098b15b8680f9b9b6c2ef11d5
Headers show
Series [FFmpeg-devel,1/7] tools/target_dec_fuzzer: Fuzz skip_frame | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Michael Niedermayer Feb. 7, 2020, 1:48 p.m. UTC
This should improve coverage

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

Comments

Michael Niedermayer July 17, 2021, 8:46 a.m. UTC | #1
On Fri, Feb 07, 2020 at 02:48:28PM +0100, Michael Niedermayer wrote:
> This should improve coverage
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  tools/target_dec_fuzzer.c | 3 +++
>  1 file changed, 3 insertions(+)

will apply

[...]
diff mbox series

Patch

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();