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>
Tue, 3 Jul 2018 23:10:28 +0000 (01:10 +0200)
commit0898a3d9909960324e27d3a7a4f48c4effbb654a
treed2c8719c4fb06246eebb3e6e52838bc7a4aeffd6
parent7e22f5d457fa042292741c1f5c38232ba10dbea2
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>
libavcodec/jpeg2000dec.c