summaryrefslogtreecommitdiff
path: root/libavcodec/acelp_vectors.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-15 12:16:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-15 12:17:40 +0200
commit3793caa5e2d1d16ed45771574b2ffc932497cfcf (patch)
tree01d0ea03081ad9b381db5a7031211dcb24d2cd8c /libavcodec/acelp_vectors.c
parentdc4a621e9ceb81c4c019aa7656c2bfbec2df18d5 (diff)
downloadffmpeg-3793caa5e2d1d16ed45771574b2ffc932497cfcf.tar.gz
avcodec/acelp_vectors: Assert that x is within the array in ff_set_fixed_vector()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/acelp_vectors.c')
-rw-r--r--libavcodec/acelp_vectors.c2
1 files changed, 2 insertions, 0 deletions
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 <inttypes.h>
+#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;