[FFmpeg-cvslog] avfilter/af_stereowiden: Check length
Michael Niedermayer
git at videolan.org
Sun Apr 14 23:24:55 EEST 2024
ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Sat Dec 23 04:03:01 2023 +0100| [cfcc45920e20042aeda9b3172bf204f0208db350] | committer: Michael Niedermayer
avfilter/af_stereowiden: Check length
Fixes: out of array access
Fixes: tickets/10746/poc13ffmpeg
Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 50f0f8c53c818f73fe2d752708e2fa9d2a2d8a07)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cfcc45920e20042aeda9b3172bf204f0208db350
---
libavfilter/af_stereowiden.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/af_stereowiden.c b/libavfilter/af_stereowiden.c
index d23c8dba75..e8bb043cd5 100644
--- a/libavfilter/af_stereowiden.c
+++ b/libavfilter/af_stereowiden.c
@@ -74,6 +74,8 @@ static int config_input(AVFilterLink *inlink)
s->length = s->delay * inlink->sample_rate / 1000;
s->length *= 2;
+ if (s->length == 0)
+ return AVERROR(EINVAL);
s->buffer = av_calloc(s->length, sizeof(*s->buffer));
if (!s->buffer)
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list