[FFmpeg-cvslog] tools/target_dec_fuzzer: Fuzz FF_DEBUG_*
Michael Niedermayer
git at videolan.org
Sat Jul 17 11:50:06 EEST 2021
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Feb 7 14:12:39 2020 +0100| [748c3fa52aac58f1a716ef5972a1c623076a0182] | committer: Michael Niedermayer
tools/target_dec_fuzzer: Fuzz FF_DEBUG_*
This should increase coverage
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=748c3fa52aac58f1a716ef5972a1c623076a0182
---
tools/target_dec_fuzzer.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index a06cf15638..3d06630e46 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -227,6 +227,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
GetByteContext gbc;
int extradata_size;
int flags;
+ int64_t flags64;
+
size -= 1024;
bytestream2_init(&gbc, data + size, 1024);
ctx->width = bytestream2_get_le32(&gbc);
@@ -283,6 +285,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
}
}
+ flags64 = bytestream2_get_le64(&gbc);
+ if (flags64 &1)
+ ctx->debug |= FF_DEBUG_SKIP;
+ if (flags64 &2)
+ ctx->debug |= FF_DEBUG_QP;
+ if (flags64 &4)
+ ctx->debug |= FF_DEBUG_MB_TYPE;
if (extradata_size < size) {
ctx->extradata = av_mallocz(extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
More information about the ffmpeg-cvslog
mailing list