mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
tools/target_dec_fuzzer: Fuzz FF_DEBUG_*
This should increase coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9fa30cf855
commit
748c3fa52a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user