Browse Source

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>
tags/n3.4
Michael Niedermayer 8 years ago
parent
commit
f225003d17
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/texturedsp.c

+ 1
- 1
libavcodec/texturedsp.c View File

@@ -158,7 +158,7 @@ static inline void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride,


for (x = 0; x < 4; x++) { for (x = 0; x < 4; x++) {
uint8_t alpha = alpha_values[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; code >>= 2;


AV_WL32(dst + x * 4, pixel); AV_WL32(dst + x * 4, pixel);


Loading…
Cancel
Save