Fixes: left shift of 1073741824 by 1 places cannot be represented in type 'int32_t' (aka 'int') Fixes: 21245/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5683334274613248 Change to int16_t suggested by Lynne
Unified · Split
| @@ -1095,7 +1095,7 @@ int ff_dirac_golomb_read_16bit(const uint8_t *buf, int bytes, · 1094 unmodified lines | ||
| 1095 | 1095 | { |
| 1096 | 1096 | LUTState lut = ff_dirac_golomb_lut[*buf++]; |
| 1097 | 1097 | int16_t *dst = (int16_t *)_dst, *last = dst + coeffs; |
| 1098 | − int16_t val = 0; | |
| 1098 | + uint16_t val = 0; | |
| 1099 | 1099 | |
| 1100 | 1100 | for (int i = 1; i < bytes; i++) |
| 1101 | 1101 | PROCESS_VALS; |
| @@ -1115,7 +1115,7 @@ int ff_dirac_golomb_read_32bit(const uint8_t *buf, int bytes, · 13 unmodified lines | ||
| 1115 | 1115 | { |
| 1116 | 1116 | LUTState lut = ff_dirac_golomb_lut[*buf++]; |
| 1117 | 1117 | int32_t *dst = (int32_t *)_dst, *last = dst + coeffs; |
| 1118 | − int32_t val = 0; | |
| 1118 | + uint32_t val = 0; | |
| 1119 | 1119 | |
| 1120 | 1120 | for (int i = 1; i < bytes; i++) |
| 1121 | 1121 | PROCESS_VALS; |