1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avfilter/af_afir: fix possible array read-overflow

This commit is contained in:
Paul B Mahol
2023-07-24 10:34:17 +02:00
parent 9fb2efe3b3
commit 60244d0bec

View File

@@ -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;