[FFmpeg-cvslog] tools/target_dec_fuzzer: Correct maxsamples_per_frame if maxsamples has been changed

Michael Niedermayer git at videolan.org
Sun Oct 18 22:42:40 EEST 2020


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep 25 22:33:43 2020 +0200| [c062dd74d7b12f661cd2ccde832bb27b990aee82] | committer: Michael Niedermayer

tools/target_dec_fuzzer: Correct maxsamples_per_frame if maxsamples has been changed

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c062dd74d7b12f661cd2ccde832bb27b990aee82
---

 tools/target_dec_fuzzer.c | 1 +
 1 file changed, 1 insertion(+)

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);



More information about the ffmpeg-cvslog mailing list