]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
fix length of longest IPv6 address string
authorYang Tse <yangsita@gmail.com>
Mon, 3 Nov 2008 14:58:08 +0000 (14:58 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 3 Nov 2008 14:58:08 +0000 (14:58 +0000)
lib/urldata.h

index 4113f3a51d79d351be1131090035e8748f29863d..4d24f1cab1c295a418df6b8466095200fe86024d 100644 (file)
@@ -48,7 +48,8 @@
 #define CURL_DEFAULT_USER "anonymous"
 #define CURL_DEFAULT_PASSWORD "ftp@example.com"
 
-#define MAX_IPADR_LEN (4*9) /* should be enough to hold the longest ipv6 one */
+/* length of longest IPv6 address string including the trailing null */
+#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
 
 #include "cookie.h"
 #include "formdata.h"