From 18b5a371ba3b020ed9e37105587e24731ebdfed6 Mon Sep 17 00:00:00 2001 From: solim <7576268+soul-sol@users.noreply.github.com> Date: Tue, 28 Jul 2026 21:48:33 +0900 Subject: [PATCH] fix: avoid signed shift in pngfix get32 Signed-off-by: solim <7576268+soul-sol@users.noreply.github.com> --- contrib/tools/pngfix.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/contrib/tools/pngfix.c b/contrib/tools/pngfix.c index 9c5eebd446..da456c9934 100644 --- a/contrib/tools/pngfix.c +++ b/contrib/tools/pngfix.c @@ -2922,11 +2922,8 @@ get32(png_byte *buffer, int offset) /* Read a 32-bit value from an 8-byte circular buffer (used only below). */ { - return - (buffer[ offset & 7] << 24) + - (buffer[(offset+1) & 7] << 16) + - (buffer[(offset+2) & 7] << 8) + - (buffer[(offset+3) & 7] ); + return PNG_U32(buffer[ offset & 7], buffer[(offset+1) & 7], + buffer[(offset+2) & 7], buffer[(offset+3) & 7]); } static void