avcodec/qpeg: Limit copy in qpeg_decode_intra() to the available bytes
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 23 Feb 2019 23:44:40 +0000 (00:44 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 3 Mar 2019 12:17:02 +0000 (13:17 +0100)
commitb819472995f55e827d6bb70dcdd86d963f65ae31
treed199663cbe0659d813717c811a0104b7c5906de4
parent951bb7632fe6e3bb1a9c3b47610705871e471f34
avcodec/qpeg: Limit copy in qpeg_decode_intra() to the available bytes

Fixes: Timeout (27 sec -> 39 milli sec)
Fixes: 13151/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QPEG_fuzzer-5717536023248896

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