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>
Thu, 21 Mar 2019 09:42:52 +0000 (10:42 +0100)
commit36a1939b59f0a966cda4de8215621db626833694
tree7049959e3032030f42a0116d08167a87d87bd2aa
parentccf6ca1701d8e5e7ecc697c983a369e2e87680b8
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>
(cherry picked from commit b819472995f55e827d6bb70dcdd86d963f65ae31)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/qpeg.c