[FFmpeg-cvslog] avfilter/af_headphone: Fix stack buffer overflow

Andreas Rheinhardt git at videolan.org
Wed Sep 9 15:59:45 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Wed Aug 26 10:11:38 2020 +0200| [58b6594b01e37ebf3daa2cb66183287a1f1b0a78] | committer: Andreas Rheinhardt

avfilter/af_headphone: Fix stack buffer overflow

The number of channels can be up to 64, not only 16.

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58b6594b01e37ebf3daa2cb66183287a1f1b0a78
---

 libavfilter/af_headphone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c
index 99bdefbcff..42adc82df8 100644
--- a/libavfilter/af_headphone.c
+++ b/libavfilter/af_headphone.c
@@ -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;



More information about the ffmpeg-cvslog mailing list