]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_headphone: Fix stack buffer overflow
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 26 Aug 2020 08:11:38 +0000 (10:11 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 9 Sep 2020 11:46:13 +0000 (13:46 +0200)
The number of channels can be up to 64, not only 16.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/af_headphone.c

index 99bdefbcff3d2e25f2998463c3c9677f2a65f6a6..42adc82df84dbb9cfe40855d1bb877d05bb680c2 100644 (file)
@@ -187,7 +187,7 @@ static int headphone_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n
     const int in_channels = in->channels;
     const int buffer_length = s->buffer_length;
     const uint32_t modulo = (uint32_t)buffer_length - 1;
-    float *buffer[16];
+    float *buffer[64];
     int wr = *write;
     int read;
     int i, l;