diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-12 13:15:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 12:20:16 +0200 |
commit | 7d37865af0ff6d2806866753a3390c557c373b2b (patch) | |
tree | e6b38244068eed52ed881cb0f853fa3325c23aae /libavcodec/texturedsp.c | |
parent | bec98cd8bd9626657f03e117858e0e270db7d4e7 (diff) | |
download | ffmpeg-7d37865af0ff6d2806866753a3390c557c373b2b.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>
Diffstat (limited to 'libavcodec/texturedsp.c')
-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 49e97c91ae..90b1eb4f11 100644 --- a/libavcodec/texturedsp.c +++ b/libavcodec/texturedsp.c @@ -158,7 +158,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); |