[PATCH] common: fit-sig: Fix error message in fit_config_verify_sig()

Simon Glass sjg at chromium.org
Wed Jan 13 17:10:34 CET 2021


On Mon, 11 Jan 2021 at 07:47, Alexandru Gagniuc <mr.nuke.me at gmail.com> wrote:
>
> In fit_config_verify_sig(), when no 'signature*' subnode exists in
> the configuration node, the fdt_for_each_subnode() loop is a no-op.
> Therefore, no error flags are set, and 'err_,sg' is not populated
> with an error string. This is incorrect behavior.
>
> Populate err_msg to indicate that no 'signature' is found, before
> entering the loop. The first call to fit_image_verify_sig() will
> override clear err_msg, or set it to a more specific message.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
> ---
>  common/image-fit-sig.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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


More information about the U-Boot mailing list