Commit 2bd8eb05 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/texturedsp: Fix runtime error: left shift of 218 by 24 places cannot...

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ed3c9b5b
...@@ -291,7 +291,7 @@ static inline void dxt5_block_internal(uint8_t *dst, ptrdiff_t stride, ...@@ -291,7 +291,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; code >>= 2;
AV_WL32(dst + x * 4, pixel); AV_WL32(dst + x * 4, pixel);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment