summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2015-03-18 14:33:43 -0700
committerJames Zern <jzern@google.com>2015-03-18 14:33:43 -0700
commit388add965f31263275b3c67e7b206a2ed3b18945 (patch)
tree9afd8969ce86712a2a25241fcc7d7558289d3a73
parent198b039e2a5c7cb1d82e061a166ebf9258b21822 (diff)
downloadlibvpx-388add965f31263275b3c67e7b206a2ed3b18945.tar
libvpx-388add965f31263275b3c67e7b206a2ed3b18945.tar.gz
libvpx-388add965f31263275b3c67e7b206a2ed3b18945.tar.bz2
libvpx-388add965f31263275b3c67e7b206a2ed3b18945.zip
vp9_fdct8x8_quant_ssse3: quiet a static analysis warning
add an assert to validate 'in' array size Change-Id: Ie5a24275c066d9dd59714f6104510abbd4850dc5
-rw-r--r--vp9/encoder/x86/vp9_dct_ssse3.c2
1 files changed, 2 insertions, 0 deletions
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 <assert.h>
#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];