[FFmpeg-devel] [PATCH 6/7] tools/target_dec_fuzzer: Fuzz FF_DEBUG_*
Michael Niedermayer
michael at niedermayer.cc
Fri Feb 7 15:48:30 EET 2020
This should increase coverage
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
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 7e73c83686..dcf9e06121 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -191,6 +191,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);
@@ -246,6 +248,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);
--
2.17.1
More information about the ffmpeg-devel
mailing list