[FFmpeg-cvslog] avcodec/snowdec: Fix integer overflow in decode_subband_slice_buffered()
Michael Niedermayer
git at videolan.org
Sun Sep 10 03:14:12 EEST 2017
ffmpeg | branch: release/3.3 | Michael Niedermayer <michael at niedermayer.cc> | Mon Aug 28 00:30:33 2017 +0200| [cd221a86a6a322b85cd0db2ef14c669afcbb8887] | committer: Michael Niedermayer
avcodec/snowdec: Fix integer overflow in decode_subband_slice_buffered()
Fixes: runtime error: signed integer overflow: 267 * 8388608 cannot be represented in type 'int'
Fixes: 2743/clusterfuzz-testcase-minimized-5820652076400640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 732f9764561558a388c05483ed6a722a5c67b05c)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd221a86a6a322b85cd0db2ef14c669afcbb8887
---
libavcodec/snowdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index 4ebfa07c6a..0ac0b55012 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -140,7 +140,7 @@ static inline void decode_subband_slice_buffered(SnowContext *s, SubBand *b, sli
v = b->x_coeff[new_index].coeff;
x = b->x_coeff[new_index++].x;
while(x < w){
- register int t= ( (v>>1)*qmul + qadd)>>QEXPSHIFT;
+ register int t= (int)( (v>>1)*(unsigned)qmul + qadd)>>QEXPSHIFT;
register int u= -(v&1);
line[x] = (t^u) - u;
More information about the ffmpeg-cvslog
mailing list