mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
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:
parent
cb7b4ee024
commit
763e31a8d3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user