Browse Source

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 b5995856a4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.3.4
Michael Niedermayer 7 years ago
parent
commit
a295d1870a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/diracdec.c

+ 1
- 1
libavcodec/diracdec.c View File

@@ -1422,7 +1422,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;
}



Loading…
Cancel
Save