diff mbox series

[FFmpeg-devel,06/25] avfilter/af_headphone: Fix stack buffer overflow

Message ID 20200908211856.16290-6-andreas.rheinhardt@gmail.com
State Accepted
Commit 58b6594b01e37ebf3daa2cb66183287a1f1b0a78
Headers show
Series [FFmpeg-devel,01/25] avfilter/af_headphone: Don't use uninitialized buffer in log message | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 8, 2020, 9:18 p.m. UTC
The number of channels can be up to 64, not only 16.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavfilter/af_headphone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Sept. 9, 2020, 12:49 a.m. UTC | #1
On Tue, Sep 08, 2020 at 11:18:37PM +0200, Andreas Rheinhardt wrote:
> The number of channels can be up to 64, not only 16.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavfilter/af_headphone.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

LGTM
diff mbox series

Patch

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;