Code

update to RFC1123 hostname specs
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>
Wed, 23 Apr 2003 04:58:38 +0000 (04:58 +0000)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>
Wed, 23 Apr 2003 04:58:38 +0000 (04:58 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@498 f882894a-f735-0410-b71e-b25c423dba1c

plugins/check_http.c

index 7678084f27b967a33d791268e91c2898b3733b1e..e22560e2213a549fe30e297fa3489445b33ae76a 100644 (file)
@@ -189,7 +189,7 @@ struct timeval tv;
 #define URI_PATH "%[/a-zA-Z0-9._-=@,]"
 
 enum {
-       MAX_IPV4_HOSTLENGTH = 64,
+       MAX_IPV4_HOSTLENGTH = 255,
        HTTP_PORT = 80,
        HTTPS_PORT = 443
 };
@@ -737,7 +737,7 @@ check_http (void)
                                asprintf (&orig_url, "%s", server_url);
                                pos = header;
                                while (pos) {
-                                       server_address = realloc (server_address, MAX_IPV4_HOSTLENGTH);
+                                       server_address = realloc (server_address, MAX_IPV4_HOSTLENGTH + 1);
                                        if (server_address == NULL)
                                                terminate (STATE_UNKNOWN,
                                                                                 "HTTP UNKNOWN: could not allocate server_address");