]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/pictordec: Fix runtime error: left shift of 805306368 by 2 places cannot...
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 13 Mar 2017 19:45:07 +0000 (20:45 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 14 Mar 2017 21:48:49 +0000 (22:48 +0100)
Fixes: 823/clusterfuzz-testcase-6727060074528768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pictordec.c

index 2dbc040b5ca1173524441d722275d9f5a9940bff..8b075bfd0cdab76d2010b5399cd437cc5e34b6dd 100644 (file)
@@ -62,7 +62,7 @@ static void picmemset(PicContext *s, AVFrame *frame, unsigned value, int run,
 {
     uint8_t *d;
     int shift = *plane * bits_per_plane;
-    int mask  = ((1 << bits_per_plane) - 1) << shift;
+    unsigned mask  = ((1 << bits_per_plane) - 1) << shift;
     value   <<= shift;
 
     while (run > 0) {