From efcb8fb5d01b0e5defb44e79751848a93399cac7 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 24 Oct 2025 04:23:08 +1100 Subject: [PATCH] Cast to UINT32 before shifting bits --- src/libImaging/BcnDecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libImaging/BcnDecode.c b/src/libImaging/BcnDecode.c index ac81ed6df3d..d99b0e28e8a 100644 --- a/src/libImaging/BcnDecode.c +++ b/src/libImaging/BcnDecode.c @@ -663,7 +663,7 @@ half_to_float(UINT16 h) { if (o.f >= m.f) { o.u |= 255 << 23; } - o.u |= (h & 0x8000) << 16; + o.u |= (UINT32)(h & 0x8000) << 16; return o.f; }