Browse code

avcodec/dds: Fix runtime error: left shift of 210 by 24 places cannot be represented in type 'int'

Fixes: 1510/clusterfuzz-testcase-minimized-5826231746428928

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Michael Niedermayer authored on 2017/05/13 08:35:56
Showing 1 changed files
... ...
@@ -718,7 +718,7 @@ static int dds_decode(AVCodecContext *avctx, void *data,
718 718
                         (frame->data[1][2+i*4]<<0)+
719 719
                         (frame->data[1][1+i*4]<<8)+
720 720
                         (frame->data[1][0+i*4]<<16)+
721
-                        (frame->data[1][3+i*4]<<24)
721
+                        ((unsigned)frame->data[1][3+i*4]<<24)
722 722
                 );
723 723
 
724 724
             frame->palette_has_changed = 1;