ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Thu 
Feb 13 20:56:56 2020 +0100| [5727b1f13f36c4db30d5d0de51640f740edf01e8] | 
committer: Michael Niedermayer

avcodec/dstdec: Check sample rate

Fixes: out of array access
Fixes: 
20659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5735812071424000

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <one...@gmail.com>
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

 libavcodec/dstdec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c
index 9feca4b085..771887faf9 100644
--- a/libavcodec/dstdec.c
+++ b/libavcodec/dstdec.c
@@ -86,6 +86,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
         return AVERROR_PATCHWELCOME;
     }
 
+    if (DST_SAMPLES_PER_FRAME(avctx->sample_rate) & 7) {
+        return AVERROR_PATCHWELCOME;
+    }
+
     avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
 
     for (i = 0; i < avctx->channels; i++)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to