[PATCH 3/4] spl: atf: Fix potential but not occurring bug

Simon Glass sjg at chromium.org
Thu Sep 21 03:02:50 CEST 2023


On Sat, 16 Sept 2023 at 02:25, Massimo Pegorer
<massimo.pegorer+oss at gmail.com> wrote:
>
> Bug: function spl_fit_images_get_entry returns uninitialized variable
> val if both fit_image_get_entry() and fit_image_get_load() fail (note
> that both of them do not set val on failure). Fix: use val only if
> entry or load address has been retrieved successfully.
>
> Note: in real world a failure of fit_image_get_load() will make current
> SPL flow to break on loading images, see spl_load_fit_image(), before
> entering spl_invoke_atf().
>
> Signed-off-by: Massimo Pegorer <massimo.pegorer+oss at gmail.com>
> ---
>  common/spl/spl_atf.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list