diff mbox series

[FFmpeg-devel,3/3] avcodec/aacps: Fix length of array in function definition

Message ID AM7PR03MB6660E83DC5C372B3E272C0A98FF39@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit ab97d163b667f4d1f1556213ae9bc1520c18780e
Headers show
Series [FFmpeg-devel,1/3] avfilter/vf_vif: Fix mismatch in number of array elements | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 6, 2021, 4:05 p.m. UTC
hybrid2_re() has a parameter declared as "const INTFLOAT filter[8]",
although the actual argument for said parameter only has seven elements;
the code itself only uses seven elements, so change the parameter.

Fixes a -Wstringop-overread warning with GCC 11.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/aacps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
index 6c7a33fea8..655e8fe5b4 100644
--- a/libavcodec/aacps.c
+++ b/libavcodec/aacps.c
@@ -51,7 +51,8 @@  static void ipdopd_reset(int8_t *ipd_hist, int8_t *opd_hist)
 
 /** Split one subband into 2 subsubbands with a symmetric real filter.
  * The filter must have its non-center even coefficients equal to zero. */
-static void hybrid2_re(INTFLOAT (*in)[2], INTFLOAT (*out)[32][2], const INTFLOAT filter[8], int len, int reverse)
+static void hybrid2_re(INTFLOAT (*in)[2], INTFLOAT (*out)[32][2],
+                       const INTFLOAT filter[7], int len, int reverse)
 {
     int i, j;
     for (i = 0; i < len; i++, in++) {