From 2dbb8aea0103ee3abc4d7d259de6ee2620db3372 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Fri, 4 Sep 2026 20:02:10 +0200 Subject: [PATCH] image: cast ELF scatter log fields to unsigned long offset/filesz are uint64_t now; cast them for the %08lx/%lu conversions so the varargs read matches on 32-bit targets, matching the check function and the rejection messages above. --- src/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/image.c b/src/image.c index 64b8a628..24c806d4 100644 --- a/src/image.c +++ b/src/image.c @@ -2555,7 +2555,8 @@ int wolfBoot_load_flash_image_elf(int part, unsigned long* entry_out, int ext_fl wolfBoot_printf("ELF: [STORE] Writing loadable segment: " "loadaddr=0x%08lx, offset=0x%08lx, size=%lu\n", - (unsigned long)load_addr, offset, filesz); + (unsigned long)load_addr, (unsigned long)offset, + (unsigned long)filesz); if (copy_flash_buffered((uintptr_t)(image + offset), load_addr, filesz, ext_flash, ext_flash) != 0) { wolfBoot_printf("ELF: [STORE] ERROR: could not write "