diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-31 13:21:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-18 16:05:23 +0200 |
commit | 2a55e8bda94375e2d61236c618e2a119b21217b2 (patch) | |
tree | 90ec46ee4209d1f3beb5332eaf9616c8d63d35d1 | |
parent | 39c729c375a67eb87d420e2079a003af6f0c7bf2 (diff) | |
download | ffmpeg-2a55e8bda94375e2d61236c618e2a119b21217b2.tar.gz |
avcodec/cavsdec: Fix runtime error: signed integer overflow: 59 + 2147483600 cannot be represented in type 'int'
Fixes: 1903/clusterfuzz-testcase-minimized-5359318167715840
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 58f8cd4ac576028ef492a005bd06b1f22c3a6879)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/cavsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 4d1b77187b..cd4eec9caf 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -615,7 +615,7 @@ static inline int decode_residual_inter(AVSContext *h) /* get quantizer */ if (h->cbp && !h->qp_fixed) - h->qp = (h->qp + get_se_golomb(&h->gb)) & 63; + h->qp = (h->qp + (unsigned)get_se_golomb(&h->gb)) & 63; for (block = 0; block < 4; block++) if (h->cbp & (1 << block)) decode_residual_block(h, &h->gb, inter_dec, 0, h->qp, |