mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
shorten: Fix out-of-array read
pred_order == FF_ARRAY_ELEMS(fixed_coeffs) is invalid too. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
ed796fba76
commit
5f5ada3dbf
@ -303,7 +303,7 @@ static int decode_subframe_lpc(ShortenContext *s, int command, int channel,
|
|||||||
} else {
|
} else {
|
||||||
/* fixed LPC coeffs */
|
/* fixed LPC coeffs */
|
||||||
pred_order = command;
|
pred_order = command;
|
||||||
if (pred_order > FF_ARRAY_ELEMS(fixed_coeffs)) {
|
if (pred_order >= FF_ARRAY_ELEMS(fixed_coeffs)) {
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n",
|
av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n",
|
||||||
pred_order);
|
pred_order);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
Loading…
Reference in New Issue
Block a user