[FFmpeg-cvslog] avcodec/snowdec: Fix runtime error: signed integer overflow: 1404 * 8388608 cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Sat Jun 3 01:11:23 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Jun 2 18:13:20 2017 +0200| [14b6adfd4627421223894c6909476d229cb6d07d] | committer: Michael Niedermayer
avcodec/snowdec: Fix runtime error: signed integer overflow: 1404 * 8388608 cannot be represented in type 'int'
Fixes: 2004/clusterfuzz-testcase-minimized-5533262866808832
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14b6adfd4627421223894c6909476d229cb6d07d
---
libavcodec/snowdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index bcb3469062..6cf15c5ae6 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -228,9 +228,9 @@ static void dequantize_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand
for(x=0; x<w; x++){
int i= line[x];
if(i<0){
- line[x]= -((-i*qmul + qadd)>>(QEXPSHIFT)); //FIXME try different bias
+ line[x]= -((-i*(unsigned)qmul + qadd)>>(QEXPSHIFT)); //FIXME try different bias
}else if(i>0){
- line[x]= (( i*qmul + qadd)>>(QEXPSHIFT));
+ line[x]= (( i*(unsigned)qmul + qadd)>>(QEXPSHIFT));
}
}
}
More information about the ffmpeg-cvslog
mailing list