diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-10 01:18:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-20 03:41:33 +0200 |
commit | 43bdff201d60d1482b6d0655f7916ccb2faa92be (patch) | |
tree | 07ddd0ae764101d62da9c9fdc78faf0d419ae2f5 | |
parent | 1c75d1b54b88d0a0a69d0c48bc1be8404d4bc0ac (diff) | |
download | ffmpeg-43bdff201d60d1482b6d0655f7916ccb2faa92be.tar.gz |
avcodec/texturedsp: Fix runtime error: left shift of 218 by 24 places cannot be represented in type 'int'
Fixes: 1428/clusterfuzz-testcase-minimized-5263281793007616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2bd8eb05d21b582d627a93852b59cb3cfc305dae)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/texturedsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c index 19aa353821..68cf434309 100644 --- a/libavcodec/texturedsp.c +++ b/libavcodec/texturedsp.c @@ -287,7 +287,7 @@ static inline void dxt5_block_internal(uint8_t *dst, ptrdiff_t stride, } } } - pixel = colors[code & 3] | (alpha << 24); + pixel = colors[code & 3] | ((unsigned)alpha << 24); code >>= 2; AV_WL32(dst + x * 4, pixel); } |