mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avfilter/af_stereowiden: Check length
Fixes: out of array access Fixes: tickets/10746/poc13ffmpeg Found-by: Zeng Yunxiang Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 50f0f8c53c818f73fe2d752708e2fa9d2a2d8a07) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9f52c6184f
commit
27197d8711
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user