diff mbox series

[FFmpeg-devel,4/6] tools/target_dec_fuzzer: Correct maxsamples_per_frame if maxsamples has been changed

Message ID 20200925222638.23675-4-michael@niedermayer.cc
State Accepted
Commit c062dd74d7b12f661cd2ccde832bb27b990aee82
Headers show
Series [FFmpeg-devel,1/6] avcodec/dxtory: Fix get_raw_size() for YUV
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Michael Niedermayer Sept. 25, 2020, 10:26 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 tools/target_dec_fuzzer.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Niedermayer Oct. 18, 2020, 7:27 p.m. UTC | #1
On Sat, Sep 26, 2020 at 12:26:36AM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  tools/target_dec_fuzzer.c | 1 +
>  1 file changed, 1 insertion(+)

will apply

[...]
diff mbox series

Patch

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 7bea736fcf..db1c6d35a6 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -185,6 +185,7 @@  int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     case AV_CODEC_ID_ZEROCODEC:   maxpixels  /= 128;   break;
     }
 
+    maxsamples_per_frame = FFMIN(maxsamples_per_frame, maxsamples);
 
     AVCodecContext* ctx = avcodec_alloc_context3(c);
     AVCodecContext* parser_avctx = avcodec_alloc_context3(NULL);