mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avfilter/af_stereotools: check s->length size
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
66e05f6ff5
commit
a525b844d9
@ -110,6 +110,10 @@ static int config_input(AVFilterLink *inlink)
|
||||
StereoToolsContext *s = ctx->priv;
|
||||
|
||||
s->length = 2 * inlink->sample_rate * 0.05;
|
||||
if (s->length <= 1 && s->length & 1) {
|
||||
av_log(ctx, AV_LOG_ERROR, "sample rate is too small\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
s->buffer = av_calloc(s->length, sizeof(*s->buffer));
|
||||
if (!s->buffer)
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user