diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-02 18:13:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-03 00:09:58 +0200 |
commit | 14b6adfd4627421223894c6909476d229cb6d07d (patch) | |
tree | c9575611be7c4b75a465b88ccdcf38ce57d69daf /libavcodec/snowdec.c | |
parent | 6f35c21659f7802a5533dea04b24958502886d7a (diff) | |
download | ffmpeg-14b6adfd4627421223894c6909476d229cb6d07d.tar.gz |
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@niedermayer.cc>
Diffstat (limited to 'libavcodec/snowdec.c')
-rw-r--r-- | libavcodec/snowdec.c | 4 |
1 files 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)); } } } |