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>
Mon, 9 Jul 2018 23:52:56 +0000 (01:52 +0200)
commit76e10cd327b3070af6df4a581727ba6602776175
tree57c50cd6fd82305cba8cb21cf843a984d84e22ed
parentf780dabc501921448b11d2e1800255ff54df5ee5
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