ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Wed Mar  7 21:36:12 
2018 +0100| [ea0963181a2cc8e42a0c58da96fb7fed5e857e5b] | committer: Paul B Mahol

avfilter/af_alimiter: check if buffer_size is valid

Fixes #7050.

Signed-off-by: Paul B Mahol <one...@gmail.com>

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

 libavfilter/af_alimiter.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavfilter/af_alimiter.c b/libavfilter/af_alimiter.c
index 0fc8e6baa3..c41e95576f 100644
--- a/libavfilter/af_alimiter.c
+++ b/libavfilter/af_alimiter.c
@@ -327,6 +327,11 @@ static int config_input(AVFilterLink *inlink)
     s->buffer_size = inlink->sample_rate * s->attack * inlink->channels;
     s->buffer_size -= s->buffer_size % inlink->channels;
 
+    if (s->buffer_size <= 0) {
+        av_log(ctx, AV_LOG_ERROR, "Attack is too small.\n");
+        return AVERROR(EINVAL);
+    }
+
     return 0;
 }
 

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

Reply via email to