diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-15 16:55:13 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-10-15 16:55:13 +0200 |
commit | e1b89c76f66343d1b495165664647317c66764bb (patch) | |
tree | 1b44a9dd0ac593fb572a8a8cd443d9fbb622648c | |
parent | de598f82f8c3f8000e1948548e8088148e2b1f44 (diff) | |
download | ffmpeg-e1b89c76f66343d1b495165664647317c66764bb.tar.gz |
avfilter/af_afade: fix heap-buffer overflow
Fixes #8276
-rw-r--r-- | libavfilter/af_afade.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index 195fb65ab5..0c43b2233d 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -483,7 +483,8 @@ static int activate(AVFilterContext *ctx) s->pts += av_rescale_q(in->nb_samples, (AVRational){ 1, outlink->sample_rate }, outlink->time_base); return ff_filter_frame(outlink, in); - } else if (ff_inlink_queued_samples(ctx->inputs[1]) >= s->nb_samples) { + } else if (ff_inlink_queued_samples(ctx->inputs[0]) >= s->nb_samples && + ff_inlink_queued_samples(ctx->inputs[1]) >= s->nb_samples) { if (s->overlap) { out = ff_get_audio_buffer(outlink, s->nb_samples); if (!out) |