[PATCH] tools: mkimage: make size_inc a signed type
Tom Rini
trini at konsulko.com
Tue Jul 15 19:20:23 CEST 2025
On Wed, 09 Jul 2025 10:34:49 +0200, Rasmus Villemoes wrote:
> In the Fixes commit, I initialized size_inc from the return value of
> the new fit_estimate_hash_sig_size() helper. That helper may fail and
> report that by returning a negative value, but I overlooked that
> size_inc had type size_t, and hence the error check doesn't work.
>
> Change size_inc to have type int so the error check works. Inside the
> loop, it is passed to another function as a size_t parameter, but
> that's fine, because we know it is non-negative, and its value may be
> incremented in steps of 1024 and is capped at ~64K, so it will
> certainly never overflow an int.
>
> [...]
Applied to u-boot/master, thanks!
[1/1] tools: mkimage: make size_inc a signed type
commit: f08e29351dcb4c07c940b8a4c6b7b3899b803980
--
Tom
More information about the U-Boot
mailing list