diff mbox

[FFmpeg-devel,1/5] tools/target_dec_fuzzer: Fuzz idct_algo value

Message ID 20191229192339.5809-1-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Dec. 29, 2019, 7:23 p.m. UTC
This should improve coverage

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

Comments

Michael Niedermayer Jan. 21, 2020, 6:44 p.m. UTC | #1
On Sun, Dec 29, 2019 at 08:23:35PM +0100, Michael Niedermayer wrote:
> This should improve coverage
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  tools/target_dec_fuzzer.c | 2 ++
>  1 file changed, 2 insertions(+)

will apply


[...]
diff mbox

Patch

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index a9ad226708..3f77ceac52 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -251,6 +251,8 @@  int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         keyframes                               = bytestream2_get_le64(&gbc);
         ctx->request_channel_layout             = bytestream2_get_le64(&gbc);
 
+        ctx->idct_algo                          = bytestream2_get_byte(&gbc) % 25;
+
         if (extradata_size < size) {
             ctx->extradata = av_mallocz(extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
             if (ctx->extradata) {