diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-08 02:18:14 +0400 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-04-01 20:33:29 +0400 |
commit | b4a223fd1936f8c7d3dd48f37f49790b0d04f429 (patch) | |
tree | da0cddd8d8383221f3c7a7abfdaa4b8ee2f1839a /libavcodec | |
parent | 4924520513d06b4d9169a1d3e0374d5a48bc02e0 (diff) |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/wmadec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index c8e1de2c32..f0b043feef 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -352,7 +352,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; |