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>
Wed, 13 Mar 2019 23:24:44 +0000 (00:24 +0100)
commitc90836cc3df3ab00dad329e51cebded37d276991
tree58b7fccb3c992adca5fe8a61690a80c7470eeff9
parent6c0124d3921d95cf92adf8d052f86240d7d73a35
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