mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/af_stereotools: round-up max size of buffer
Fixes: out of array access Fixes: tickets/10747/poc14ffmpeg Found-by: Zeng Yunxiang and Song Jiaxuan Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e4d2666bdc
commit
e6459abfad
|
@ -119,7 +119,7 @@ static int config_input(AVFilterLink *inlink)
|
|||
AVFilterContext *ctx = inlink->dst;
|
||||
StereoToolsContext *s = ctx->priv;
|
||||
|
||||
s->length = FFALIGN(inlink->sample_rate / 10, 2);
|
||||
s->length = FFALIGN((inlink->sample_rate + 9) / 10, 2);
|
||||
if (!s->buffer)
|
||||
s->buffer = av_calloc(s->length, sizeof(*s->buffer));
|
||||
if (!s->buffer)
|
||||
|
|
Loading…
Reference in New Issue