diff mbox series

[FFmpeg-devel,1/7] tools/target_dec_fuzzer: Fuzz skip_frame

Message ID 20200207134831.23137-1-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/7] tools/target_dec_fuzzer: Fuzz skip_frame
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Michael Niedermayer Feb. 7, 2020, 1:48 p.m. UTC
Should allow coverage of related code

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

Patch

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 2487b6ca94..67a2a41874 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -223,6 +223,8 @@  int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         ctx->request_channel_layout             = bytestream2_get_le64(&gbc);
 
         ctx->idct_algo                          = bytestream2_get_byte(&gbc) % 25;
+        ctx->skip_frame                         = bytestream2_get_byte(&gbc) - 254 + AVDISCARD_ALL;
+
 
         if (flags & 0x20) {
             switch (ctx->codec_id) {