[PATCH 1/1] net: lwip/wget: correct SERVER_NAME_SIZE

Jerome Forissier jerome.forissier at linaro.org
Fri Nov 8 21:48:00 CET 2024



On 11/8/24 17:45, Heinrich Schuchardt wrote:
> The maximum length of a domain name is 253 as defined in RFC 1035.
> So SERVER_NAME_SIZE should be 254 including NUL.
> 
> Fixes: 3c656c928bd7 ("net: lwip: add wget command")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  net/lwip/wget.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/lwip/wget.c b/net/lwip/wget.c
> index b495ebd1aa9..a66b14d1161 100644
> --- a/net/lwip/wget.c
> +++ b/net/lwip/wget.c
> @@ -12,7 +12,7 @@
>  #include <net.h>
>  #include <time.h>
>  
> -#define SERVER_NAME_SIZE 200
> +#define SERVER_NAME_SIZE 254
>  #define HTTP_PORT_DEFAULT 80
>  #define PROGRESS_PRINT_STEP_BYTES (100 * 1024)
>  

Reviewed-by: Jerome Forissier <jerome.forissier at linaro.org>

Thanks,
-- 
Jerome


More information about the U-Boot mailing list