aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_afir.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-07-24 10:34:17 +0200
committerPaul B Mahol <onemda@gmail.com>2023-07-24 11:01:21 +0200
commit60244d0becd06239edbac06ef3c81fa22310b031 (patch)
treed209ec1606a7876cf4f507ca1152e22b0f4a815b /libavfilter/af_afir.c
parent9fb2efe3b33e9b589f6e93a32b5128b3aef98ab1 (diff)
downloadffmpeg-60244d0becd06239edbac06ef3c81fa22310b031.tar.gz
avfilter/af_afir: fix possible array read-overflow
Diffstat (limited to 'libavfilter/af_afir.c')
-rw-r--r--libavfilter/af_afir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
index 502e544687..e00d14d084 100644
--- a/libavfilter/af_afir.c
+++ b/libavfilter/af_afir.c
@@ -222,8 +222,8 @@ static int init_segment(AVFilterContext *ctx, AudioFIRSegment *seg, int selir,
seg->fft_length = (part_size + 1) * 2;
seg->part_size = part_size;
- seg->block_size = FFALIGN(seg->fft_length, cpu_align);
seg->coeff_size = FFALIGN(seg->part_size + 1, cpu_align);
+ seg->block_size = FFMAX(seg->coeff_size * 2, FFALIGN(seg->fft_length, cpu_align));
seg->nb_partitions = nb_partitions;
seg->input_size = offset + s->min_part_size;
seg->input_offset = offset;