[U-Boot, v5, 1/1] misc: fs_loader: Add request_firmware_into_buf_via_script() for flexible firmware loading via U-Boot script
Marek Vasut
marek.vasut at mailbox.org
Sun Aug 17 14:27:00 CEST 2025
On 8/14/25 5:12 PM, Lucien.Jheng wrote:
Hi,
> + if (size > max_size) {
> + log_err("Loaded firmware size 0x%lx exceeded maximum allowed size 0x%lx.\n",
> + size, max_size);
> + return -E2BIG;
> + }
> +
> + memcpy(*buf, (void *)addr, min(size, max_size));
Do you still need the min() function ^ here , now that size is surely <=
max_size ?
Besides that, I think the patch is pretty much ready.
More information about the U-Boot
mailing list