/* Limit the memory access to less than 4GB for 32-bit platforms. */
if (address > GRUB_EFI_MAX_USABLE_ADDRESS)
{
+ char inv_addr[17], max_addr[17]; /* log16(2^64) = 16, plus NUL. */
+
+ grub_snprintf (inv_addr, sizeof (inv_addr) - 1, "%" PRIxGRUB_UINT64_T,
+ address);
+ grub_snprintf (max_addr, sizeof (max_addr) - 1, "%" PRIxGRUB_UINT64_T,
+ (grub_efi_uint64_t) GRUB_EFI_MAX_USABLE_ADDRESS);
grub_error (GRUB_ERR_BAD_ARGUMENT,
- N_("invalid memory address (0x%" PRIxGRUB_UINT64_T
- " > 0x%" PRIxGRUB_UINT64_T ")"),
- address, (grub_efi_uint64_t) GRUB_EFI_MAX_USABLE_ADDRESS);
+ N_("invalid memory address (0x%s > 0x%s)"), inv_addr, max_addr);
return NULL;
}