avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_decode*()
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 27 Nov 2015 19:52:39 +0000 (20:52 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 6 Dec 2015 01:51:26 +0000 (02:51 +0100)
commit9d5bdca3d8af5dd86d27f300ff19180a295fa934
tree81ae86322e7cc6166ac4ebdca46405d8480feadb
parent31e54f41a023d426909d55b54275cd33faf20296
avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_decode*()

Fixes out of array access
Fixes: 01859c9a9ac6cd60a008274123275574/asan_heap-oob_1dff571_8250_50d3d1611e294c3519fd1fa82198b69b.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 75422280fbcdfbe9dc56bde5525b4d8b280f1bc5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/jpeg2000dwt.c