avcodec/loco: Limit lossy parameter so it is sane and does not overflow
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 15 Jun 2019 19:47:16 +0000 (21:47 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 27 Jun 2019 15:50:47 +0000 (17:50 +0200)
commit479b70d2f84b340a66ade598454df968bf71cf5f
treef5519ac36218c789f0da70267e595077154f28e5
parent65e144014080281165a4cc04ab6096995c118d91
avcodec/loco: Limit lossy parameter so it is sane and does not overflow

Fixes: 15248/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5087440458481664
Fixes: signed integer overflow: 3 + 2147483647 cannot be represented in type 'int'

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 ce3b0b9066b433564ed3ee3eed3a1e8f2c0834a1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/loco.c