[FFmpeg-cvslog] avcodec/cavsdec: Fix runtime error: signed integer overflow: 31 + 2147483640 cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Sat May 13 03:11:17 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat May 13 00:42:29 2017 +0200| [5ac17f187ae6ec97ad41b763f999bd99782c37aa] | committer: Michael Niedermayer
avcodec/cavsdec: Fix runtime error: signed integer overflow: 31 + 2147483640 cannot be represented in type 'int'
Fixes: 1506/clusterfuzz-testcase-minimized-5401272918212608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ac17f187ae6ec97ad41b763f999bd99782c37aa
---
libavcodec/cavsdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index eb2464f36d..800c1af462 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -684,7 +684,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code)
}
h->cbp = cbp_tab[cbp_code][0];
if (h->cbp && !h->qp_fixed)
- h->qp = (h->qp + get_se_golomb(gb)) & 63; //qp_delta
+ h->qp = (h->qp + (unsigned)get_se_golomb(gb)) & 63; //qp_delta
/* luma intra prediction interleaved with residual decode/transform/add */
for (block = 0; block < 4; block++) {
More information about the ffmpeg-cvslog
mailing list