avcodec/h264_cavlc: Fix integer overflows with motion vector residual addition
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 26 Jun 2019 22:55:29 +0000 (00:55 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 19 Jul 2019 19:42:38 +0000 (21:42 +0200)
commitb789ebf681eadd28cc137125b567d3e84bc05d55
treee69ca4b0abd075018f309aa515638e99c2efed2d
parentc5f265bb2468c3e0996329ada11b2792dd9bd1a2
avcodec/h264_cavlc: Fix integer overflows with motion vector residual addition

Fixes: signed integer overflow: 14 + 2147483647 cannot be represented in type 'int'
Fixes: 14794/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5677380695228416

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