[PATCH 2/2] image-host: increase path length when setting up the cipher.

Simon Glass sjg at chromium.org
Sun Dec 31 13:48:47 CET 2023


On Fri, Dec 29, 2023 at 2:07 PM Hugo Cornelis
<hugo.cornelis at essensium.com> wrote:
>
> This patch increases the maximum path length of the filename
> containing the cipher key for the kernel from 128 to 256 characters.
>
> Signed-off-by: Hugo Cornelis <hugo.cornelis at essensium.com>
> ---
>
>  tools/image-host.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

This is fine, but do you not want to use PATH_MAX ? We should not need
to worry about stack space on the host.

>
> diff --git a/tools/image-host.c b/tools/image-host.c
> index 3719f36117..b0012a714d 100644
> --- a/tools/image-host.c
> +++ b/tools/image-host.c
> @@ -376,7 +376,7 @@ static int fit_image_setup_cipher(struct image_cipher_info *info,
>                                   int noffset)
>  {
>         char *algo_name;
> -       char filename[128];
> +       char filename[256];
>         int ret = -1;
>         int snprintf_return;
>
> --
> 2.34.1
>

Regards,
Simon


More information about the U-Boot mailing list