From: James Zern Date: Wed, 18 Mar 2015 21:33:43 +0000 (-0700) Subject: vp9_fdct8x8_quant_ssse3: quiet a static analysis warning X-Git-Tag: v1.4.0~17^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=388add965f31263275b3c67e7b206a2ed3b18945;p=libvpx vp9_fdct8x8_quant_ssse3: quiet a static analysis warning add an assert to validate 'in' array size Change-Id: Ie5a24275c066d9dd59714f6104510abbd4850dc5 --- diff --git a/vp9/encoder/x86/vp9_dct_ssse3.c b/vp9/encoder/x86/vp9_dct_ssse3.c index a1a2bda80..bdc75e993 100644 --- a/vp9/encoder/x86/vp9_dct_ssse3.c +++ b/vp9/encoder/x86/vp9_dct_ssse3.c @@ -8,6 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include #if defined(_MSC_VER) && _MSC_VER <= 1500 // Need to include math.h before calling tmmintrin.h/intrin.h // in certain versions of MSVS. @@ -374,6 +375,7 @@ void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride, __m128i qcoeff0, qcoeff1; __m128i qtmp0, qtmp1; + assert(index < (int)(sizeof(in) / sizeof(in[0])) - 1); coeff0 = *in[index]; coeff1 = *in[index + 1];