diff mbox series

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

Message ID 20241108174526.16390-1-heinrich.schuchardt@canonical.com
State New
Headers show
Series [1/1] net: lwip/wget: correct SERVER_NAME_SIZE | expand

Commit Message

Heinrich Schuchardt Nov. 8, 2024, 5:45 p.m. UTC
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@canonical.com>
---
 net/lwip/wget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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)