diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-01-25 23:14:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-01-30 22:08:32 +0100 |
commit | fe1e6c06d03432c3e9208f019533c1d701f485d0 (patch) | |
tree | e206da471ac711b097c1b8825f756efeddcbb6e6 /libavcodec/dirac_dwt_template.c | |
parent | 2ff9f178519b68d4d1d606eb5451ad81da948efc (diff) | |
download | ffmpeg-fe1e6c06d03432c3e9208f019533c1d701f485d0.tar.gz |
avcodec/dirac_dwt: Fix several integer overflows
Fixes: runtime error: signed integer overflow: -2146071175 + -268479557 cannot be represented in type 'int'
Fixes: 5237/clusterfuzz-testcase-minimized-4569895275593728
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/dirac_dwt_template.c')
-rw-r--r-- | libavcodec/dirac_dwt_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dirac_dwt_template.c b/libavcodec/dirac_dwt_template.c index e436c247a1..e68cc4d530 100644 --- a/libavcodec/dirac_dwt_template.c +++ b/libavcodec/dirac_dwt_template.c @@ -49,7 +49,7 @@ static void RENAME(vertical_compose53iL0)(uint8_t *_b0, uint8_t *_b1, uint8_t *_ TYPE *b1 = (TYPE *)_b1; TYPE *b2 = (TYPE *)_b2; for (i = 0; i < width; i++) - b1[i] -= (int)(b0[i] + (unsigned)b2[i] + 2) >> 2; + b1[i] -= (unsigned)((int)(b0[i] + (unsigned)b2[i] + 2) >> 2); } static av_always_inline void RENAME(interleave)(TYPE *dst, TYPE *src0, TYPE *src1, int w2, |