[FFmpeg-cvslog] avcodec/acelp_vectors: Assert that x is within the array in ff_set_fixed_vector()

Michael Niedermayer git at videolan.org
Fri May 15 12:56:32 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May 15 12:16:36 2015 +0200| [3793caa5e2d1d16ed45771574b2ffc932497cfcf] | committer: Michael Niedermayer

avcodec/acelp_vectors: Assert that x is within the array in ff_set_fixed_vector()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3793caa5e2d1d16ed45771574b2ffc932497cfcf
---

 libavcodec/acelp_vectors.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/acelp_vectors.c b/libavcodec/acelp_vectors.c
index 86851a3..798217d 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;



More information about the ffmpeg-cvslog mailing list