Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-09-10 02:32:50 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-17 16:57:27 +0300
commit10ae5fb2696103f46d74f069f7187883873002a6 (patch)
tree8d2b20f834285dd5ba725806604d7f2fb4a922a0
parent5e7ddf0b4a697732b71cfc7e612ec0b62b75cca1 (diff)
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> (cherry picked from commit b5995856a4236c27f231210bb08d70688e045192) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/diracdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index f92ff1b2ea..4f6de7af3d 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -1343,7 +1343,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;
}