diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-12 13:15:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-20 03:41:33 +0200 |
commit | 4ea880c55ea4326ea98f64f56c9be26853dded39 (patch) | |
tree | 3036e26c64b2d12e49dea85c0a0b867ca07a077b | |
parent | 4ce0554daa102001477813929b3a97913f9a6aa5 (diff) | |
download | ffmpeg-4ea880c55ea4326ea98f64f56c9be26853dded39.tar.gz |
avcodec/texturedsp: Fix runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 1505/clusterfuzz-testcase-minimized-4561688818876416
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 f225003d17364cd38fd28f268ae2b29abd8e5024)
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 68cf434309..9e30f8c988 100644 --- a/libavcodec/texturedsp.c +++ b/libavcodec/texturedsp.c @@ -154,7 +154,7 @@ static inline void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride, for (x = 0; x < 4; x++) { uint8_t alpha = alpha_values[x]; - uint32_t pixel = colors[code & 3] | (alpha << 24); + uint32_t pixel = colors[code & 3] | ((unsigned)alpha << 24); code >>= 2; AV_WL32(dst + x * 4, pixel); |