You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/acelp_vectors: Assert that x is within the array in ff_set_fixed_vector()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/common.h"
|
#include "libavutil/common.h"
|
||||||
#include "libavutil/float_dsp.h"
|
#include "libavutil/float_dsp.h"
|
||||||
#include "avcodec.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;
|
float y = in->y[i] * scale;
|
||||||
|
|
||||||
if (in->pitch_lag > 0)
|
if (in->pitch_lag > 0)
|
||||||
|
av_assert0(x < size);
|
||||||
do {
|
do {
|
||||||
out[x] += y;
|
out[x] += y;
|
||||||
y *= in->pitch_fac;
|
y *= in->pitch_fac;
|
||||||
|
Reference in New Issue
Block a user