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, 22 Oct 2018 23:44:40 +0000 (01:44 +0200)
commit405cfcae41cd86d0485467c7ca2a22d16cea0cf9
tree688b4e9d337be3f5803bc5dcc77397bc94d27800
parentdd7d2770f331cb1d2b3cdb2b2dbdbe1ce9b2b807
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