diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-09-10 01:32:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-09-11 12:23:53 +0200 |
commit | b5995856a4236c27f231210bb08d70688e045192 (patch) | |
tree | ffe0887b1a71578d58df1dcfc9603522b0deaa71 /libavcodec/diracdec.c | |
parent | 8e17cd20b9cd189b18c73d10391a7729edf44070 (diff) | |
download | ffmpeg-b5995856a4236c27f231210bb08d70688e045192.tar.gz |
avcodec/diracdec: Fix overflow in DC computation
Fixes: runtime error: signed integer overflow: 11896 + 2147483646 cannot be represented in type 'int'
Fixes: 3053/clusterfuzz-testcase-minimized-6355082062856192
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r-- | libavcodec/diracdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index f2aed6057d..0abb8b0599 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -1421,7 +1421,7 @@ static void decode_block_params(DiracContext *s, DiracArith arith[8], DiracBlock if (!block->ref) { pred_block_dc(block, stride, x, y); for (i = 0; i < 3; i++) - block->u.dc[i] += dirac_get_arith_int(arith+1+i, CTX_DC_F1, CTX_DC_DATA); + block->u.dc[i] += (unsigned)dirac_get_arith_int(arith+1+i, CTX_DC_F1, CTX_DC_DATA); return; } |