mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-20 22:41:11 +00:00
wma: fix off-by-one in array bounds check.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
6eda85e15b
commit
b4bccf3e4e
@ -356,7 +356,7 @@ static int decode_exp_vlc(WMACodecContext *s, int ch)
|
|||||||
}
|
}
|
||||||
/* NOTE: this offset is the same as MPEG4 AAC ! */
|
/* NOTE: this offset is the same as MPEG4 AAC ! */
|
||||||
last_exp += code - 60;
|
last_exp += code - 60;
|
||||||
if ((unsigned)last_exp + 60 > FF_ARRAY_ELEMS(pow_tab)) {
|
if ((unsigned)last_exp + 60 >= FF_ARRAY_ELEMS(pow_tab)) {
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",
|
av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",
|
||||||
last_exp);
|
last_exp);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user