avcodec/jpeg2000: Dynamically allocate codeblock data
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 18 Nov 2017 00:33:18 +0000 (01:33 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 22 Nov 2017 12:06:50 +0000 (13:06 +0100)
commit3d5822d9cf07d08bce82903e4715658f46b01b5c
treea660d16797efc73b3a7cd35e41b09fa15c38a5e8
parente8e9306b4f0017c3d2ae2a9f02136279c1a105e9
avcodec/jpeg2000: Dynamically allocate codeblock data

Fixes: OOM
Fixes: 3541/clusterfuzz-testcase-minimized-6469958596820992

Adds support for decoding codeblock data larger than 8kb
Reduces decoder memory consumption

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/j2kenc.c
libavcodec/jpeg2000.c
libavcodec/jpeg2000.h
libavcodec/jpeg2000dec.c