[FFmpeg-cvslog] avcodec/cavsdec: Fix runtime error: signed integer overflow: 59 + 2147483600 cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Tue Jun 6 01:08:44 EEST 2017
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Wed May 31 13:21:58 2017 +0200| [b62a5c83fcc569bb3607e4bb6520d10651674bea] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 58f8cd4ac576028ef492a005bd06b1f22c3a6879)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b62a5c83fcc569bb3607e4bb6520d10651674bea
---
libavcodec/cavsdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 74e9f0f900..3aec0dd5e5 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -616,7 +616,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,
More information about the ffmpeg-cvslog
mailing list