Commit 60244d0b authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_afir: fix possible array read-overflow

parent 9fb2efe3
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment