[prev in list] [next in list] [prev in thread] [next in thread] 

List:       u-boot
Subject:    Re: [PATCH 2/2] image-host: increase path length when setting up the cipher.
From:       Simon Glass <sjg () chromium ! org>
Date:       2023-12-31 12:48:47
Message-ID: CAFLszTjT_Wue_yctsvekLXbPfBR0MofvMhF1Mxsh6xvN5Nd6dw () mail ! gmail ! com
[Download RAW message or body]

On Fri, Dec 29, 2023 at 2:07 PM Hugo Cornelis
<hugo.cornelis@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@essensium.com>
> ---
>
>  tools/image-host.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic