This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 903239c4eb avfilter/af_alimiter: compute the buffer size without int
overflow
903239c4eb is described below
commit 903239c4ebfdad70ca2d976007ed92301845cba2
Author: Michael Niedermayer <[email protected]>
AuthorDate: Thu Sep 24 00:50:13 2026 +0200
Commit: michaelni <[email protected]>
CommitDate: Mon Sep 28 21:02:00 2026 +0000
avfilter/af_alimiter: compute the buffer size without int overflow
Fixes: out of array access
Fixes: signed integer overflow
Fixes: pkKQIDVxuWvP/testcase/alimiter-overflow.wav
Fixes: pkKQIDVxuWvP
Found-by: mzfr <[email protected]>
---
libavfilter/af_alimiter.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavfilter/af_alimiter.c b/libavfilter/af_alimiter.c
index 61ea7beb6f..8ef6d74afd 100644
--- a/libavfilter/af_alimiter.c
+++ b/libavfilter/af_alimiter.c
@@ -360,10 +360,10 @@ static int config_input(AVFilterLink *inlink)
{
AVFilterContext *ctx = inlink->dst;
AudioLimiterContext *s = ctx->priv;
- int obuffer_size;
+ int64_t obuffer_size;
- obuffer_size = inlink->sample_rate * inlink->ch_layout.nb_channels * 100 /
1000. + inlink->ch_layout.nb_channels;
- if (obuffer_size < inlink->ch_layout.nb_channels)
+ obuffer_size = inlink->sample_rate *
(int64_t)inlink->ch_layout.nb_channels / 10 + inlink->ch_layout.nb_channels;
+ if (obuffer_size > INT_MAX)
return AVERROR(EINVAL);
s->buffer = av_calloc(obuffer_size, sizeof(*s->buffer));
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]