avcodec/jpeg2000dec: Check that there are enough bytes for all tiles
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 2 Jul 2018 16:40:08 +0000 (18:40 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 7 Jul 2018 10:27:00 +0000 (12:27 +0200)
commit428c3e5975d3cf742b97aeb4a8352ed3bcd8bb0d
treebf6285d874e9bea41eed1e67c3c2ee85800d72e1
parent3a04f518ac283194bb13d8aff7d9fa963d551547
avcodec/jpeg2000dec: Check that there are enough bytes for all tiles

Fixes: OOM
Fixes: 8781/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5810709081358336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0898a3d9909960324e27d3a7a4f48c4effbb654a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/jpeg2000dec.c