aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-03-07 14:18:14 -0800
committerReinhard Tartler <siretart@tauware.de>2012-03-13 23:30:39 +0100
commit1fcc2c60914c1fd9c516203f675676e1586b0376 (patch)
treef64d40fd50e27b74c80bb3264b8f2222fb07ccb1
parent74871ac70ae387470a5da469157050cb2d3ed36f (diff)
downloadffmpeg-1fcc2c60914c1fd9c516203f675676e1586b0376.tar.gz
wma: fix off-by-one in array bounds check.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org (cherry picked from commit b4bccf3e4e58f6fe58043791ca09db01a4343fac) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavcodec/wmadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 37feca1f7f..a7300594ca 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -356,7 +356,7 @@ static int decode_exp_vlc(WMACodecContext *s, int ch)
}
/* NOTE: this offset is the same as MPEG4 AAC ! */
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",
last_exp);
return -1;