Fixes: runtime error: shift exponent 4294967289 is too large for 32-bit type 'int' Fixes: 3030/clusterfuzz-testcase-minimized-4649809254285312
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -262,7 +262,7 @@ static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst, i · 261 unmodified lines | ||
| 262 | 262 | |
| 263 | 263 | flag = 0; |
| 264 | 264 | |
| 265 | − if (state * 4ULL > 0xFF || i >= size) | |
| 265 | + if ((uint64_t)state > 0xFF / 4 || i >= size) | |
| 266 | 266 | continue; |
| 267 | 267 | |
| 268 | 268 | pfx = ((state + 8) >> 5) + (state ? ff_clz(state): 32) - 24; |