[FFmpeg-cvslog] avcodec/texturedsp: Fix multiple runtime error: left shift of 255 by 24 places cannot be represented in type 'int'

Michael Niedermayer git at videolan.org
Sun May 7 05:13:50 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun May  7 03:27:17 2017 +0200| [e92fb2bea1800b987ebc3cbeef9d48cfe4bcd191] | committer: Michael Niedermayer

avcodec/texturedsp: Fix multiple runtime error: left shift of 255 by 24 places cannot be represented in type 'int'

Fixes: 1386/clusterfuzz-testcase-minimized-5323086394032128

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e92fb2bea1800b987ebc3cbeef9d48cfe4bcd191
---

 libavcodec/texturedsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c
index 5012245a26..6049c96791 100644
--- a/libavcodec/texturedsp.c
+++ b/libavcodec/texturedsp.c
@@ -35,7 +35,7 @@
 #define RGBA(r, g, b, a) (((uint8_t)(r) <<  0) | \
                           ((uint8_t)(g) <<  8) | \
                           ((uint8_t)(b) << 16) | \
-                          ((uint8_t)(a) << 24))
+                          ((unsigned)(uint8_t)(a) << 24))
 
 static av_always_inline void extract_color(uint32_t colors[4],
                                            uint16_t color0,



More information about the ffmpeg-cvslog mailing list