[FFmpeg-cvslog] tools/target_dec_fuzzer: Set extradata for the parser
Michael Niedermayer
git at videolan.org
Sat Jul 17 11:50:02 EEST 2021
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Feb 7 14:04:52 2020 +0100| [a0fd56f55e12427098b15b8680f9b9b6c2ef11d5] | committer: Michael Niedermayer
tools/target_dec_fuzzer: Set extradata for the parser
This should improve coverage
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0fd56f55e12427098b15b8680f9b9b6c2ef11d5
---
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 a13b3ad08b..60a1cdd027 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -303,6 +303,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();
More information about the ffmpeg-cvslog
mailing list