avcodec/mjpegdec: Check input buffer size.
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 10 Apr 2018 14:12:15 +0000 (16:12 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 12 Apr 2018 22:35:15 +0000 (00:35 +0200)
commit6de499caed33f26cfce32f0ddd74b2a518f60402
treec3fbeef04431093a03e1f7bdb2e8904af7cbdce3
parent41458534aa8890810b678bcdb4c1c04f38b72231
avcodec/mjpegdec: Check input buffer size.

Fixes: Timeout
Fixes: 6381/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5665032743419904

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 8d381b57fd9d17fb5c3a851ca46c738b3afc33a2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mjpegdec.c
libavcodec/mjpegdec.h