1
0
Fork 0

lavc/vvc: Clamp shift RHS

Resolves the following undefined behavior sanitiser error:
runtime error: shift exponent 32 is too large for 32-bit type 'int'

Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Frank Plowman 2024-01-26 09:13:13 +00:00 committed by James Almer
parent cb7b4ee024
commit 763e31a8d3
1 changed files with 1 additions and 1 deletions

View File

@ -969,7 +969,7 @@ static void FUNC(pred_angular_h)(uint8_t *_src, const uint8_t *_top, const uint8
int pos = (1 + ref_idx) * intra_pred_angle;
int wt;
if (need_pdpc)
wt = (32 >> ((y * 2) >> nscale));
wt = (32 >> FFMIN(31, (y * 2) >> nscale));
for (int x = 0; x < w; x++) {
const int idx = (pos >> 5) + ref_idx;