1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avfilter/af_anequalizer: fix off by one in reallocation

This commit is contained in:
Paul B Mahol 2020-03-14 19:39:04 +01:00
parent fa5bff611d
commit 6fbc7f092e

View File

@ -566,7 +566,7 @@ static void equalizer(EqualizatorFilter *f, double sample_rate)
static int add_filter(AudioNEqualizerContext *s, AVFilterLink *inlink)
{
equalizer(&s->filters[s->nb_filters], inlink->sample_rate);
if (s->nb_filters >= s->nb_allocated) {
if (s->nb_filters >= s->nb_allocated - 1) {
EqualizatorFilter *filters;
filters = av_calloc(s->nb_allocated, 2 * sizeof(*s->filters));