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

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Fri Nov 8 18:45:26 CET 2024


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)
 
-- 
2.45.2



More information about the U-Boot mailing list