aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-11-03 14:58:08 +0000
committerYang Tse <yangsita@gmail.com>2008-11-03 14:58:08 +0000
commit74e97183702b37461f981de780c1e2209d45f45a (patch)
treeb0e7f550af52111f1c2ed2d091fc5e163d0d8100
parent2d71c9cdfd6ad73ac466f5fce01b4c933012c66c (diff)
fix length of longest IPv6 address string
-rw-r--r--lib/urldata.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 4113f3a51..4d24f1cab 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -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"