From 3793caa5e2d1d16ed45771574b2ffc932497cfcf Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 12:16:36 +0200 Subject: [PATCH] avcodec/acelp_vectors: Assert that x is within the array in ff_set_fixed_vector() Signed-off-by: Michael Niedermayer --- libavcodec/acelp_vectors.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/acelp_vectors.c b/libavcodec/acelp_vectors.c index 86851a3a8a..798217d73b 100644 --- a/libavcodec/acelp_vectors.c +++ b/libavcodec/acelp_vectors.c @@ -22,6 +22,7 @@ #include +#include "libavutil/avassert.h" #include "libavutil/common.h" #include "libavutil/float_dsp.h" #include "avcodec.h" @@ -240,6 +241,7 @@ void ff_set_fixed_vector(float *out, const AMRFixed *in, float scale, int size) float y = in->y[i] * scale; if (in->pitch_lag > 0) + av_assert0(x < size); do { out[x] += y; y *= in->pitch_fac;