avcodec/jpeg2000dec: Check precno before using it in JPEG2000_PGOD_CPRL
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Nov 2013 02:50:20 +0000 (03:50 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Nov 2013 03:02:24 +0000 (04:02 +0100)
commit3d5a5e86be2a65e33c34ab3ad7923f54e8e49c1d
treeeb90a7ebaff2bb0962db0d04907746a727471bb2
parent638d79a9d0805e4863f6cd6cce146e3121a26071
avcodec/jpeg2000dec: Check precno before using it in JPEG2000_PGOD_CPRL

Fixes out of array reads
Fixes: asan_heap-oob_f0de57_6823_mjp2.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c