avcodec/pictordec: runtime error: left shift of 15 by 28 places cannot be represented...
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 21 Mar 2017 01:20:35 +0000 (02:20 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 23 Mar 2017 14:25:48 +0000 (15:25 +0100)
Fixes: 898/clusterfuzz-testcase-6149765467209728

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 8b075bf..b29a484 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;
-    unsigned mask  = ((1 << bits_per_plane) - 1) << shift;
+    unsigned mask  = ((1U << bits_per_plane) - 1) << shift;
     value   <<= shift;
 
     while (run > 0) {