[PATCH] spl: spl_load: fix comparison between negative error code and unsigned size
Tom Rini
trini at konsulko.com
Wed Sep 11 00:38:41 CEST 2024
On Sat, 31 Aug 2024 12:17:06 +0900, Daniel Palmer wrote:
> read could be a negative error value but size in spl_image is unsigned
> so when they are compared read is used as if it's a unsigned value
> and if it's negative it'll most likely be bigger than size and the
> result will be true and _spl_load() will return 0 to the caller.
>
> This results in the caller to _spl_load() not seeing that an error happened
> as it should and continuing as if the load was completed when it might
> not have been.
>
> [...]
Applied to u-boot/next, thanks!
--
Tom
More information about the U-Boot
mailing list