From 6ab032a1fd4522897582ffb8731b60464da13cd8 Mon Sep 17 00:00:00 2001 From: solim <7576268+soul-sol@users.noreply.github.com> Date: Tue, 28 Jul 2026 20:56:06 +0900 Subject: [PATCH] arm: avoid overflow in RGBA palette offset Signed-off-by: solim <7576268+soul-sol@users.noreply.github.com> --- arm/arm_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/arm_init.c b/arm/arm_init.c index 664d05d857..3b2e246b1b 100644 --- a/arm/arm_init.c +++ b/arm/arm_init.c @@ -145,7 +145,7 @@ png_target_do_expand_palette_neon(png_struct *png_ptr, png_row_info *row_info, * way despite the fact that the comments in the neon palette code * obfuscate what is happening. */ - png_byte *dp = row + (4/*RGBA*/*row_width - 1); + png_byte *dp = row + (4/*RGBA*/ * (size_t)row_width - 1); /* Cosmin Truta: "Sometimes row_info->bit_depth has been changed to 8. * In these cases, the palette hasn't been riffled."