[PATCH master] sandbox: libc_malloc: multiply, not add, args in calloc overflow check
Sascha Hauer
s.hauer at pengutronix.de
Tue Mar 4 00:16:03 PST 2025
On Mon, 03 Mar 2025 14:28:00 +0100, Ahmad Fatoum wrote:
> libc_malloc is built without access to barebox headers, so instead of
> size_mul it's using GCC builtins directly.
>
> The check against BAREBOX_MALLOC_MAX_SIZE should've been done using the
> product as indicated by the variable name, but erroneously
> __builtin_add_overflow was used instead of __builtin_mul_overflow.
>
> [...]
Applied, thanks!
[1/1] sandbox: libc_malloc: multiply, not add, args in calloc overflow check
https://git.pengutronix.de/cgit/barebox/commit/?id=75296e2aa356 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list