Message ID | 20240521024652.1006233-5-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | bfc22f364d31d8f2dc2acae1bd03d5894a00b8c5 |
Headers | show |
Series | [FFmpeg-devel,1/7] avutil/random_seed: Avoid dead returns | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 2b2358d2cc1..c1d6236f37f 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -830,7 +830,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], cbu = (cbu * contrast * saturation) >> 32; cgu = (cgu * contrast * saturation) >> 32; cgv = (cgv * contrast * saturation) >> 32; - oy -= 256 * brightness; + oy -= 256LL * brightness; c->uOffset = 0x0400040004000400LL; c->vOffset = 0x0400040004000400LL;
This will not overflow for normal values Fixes: CID1500280 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libswscale/yuv2rgb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)