From 994051b26f43c818bd3bfe481d2da48747a632ba Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Wed, 23 Apr 2003 04:58:38 +0000 Subject: update to RFC1123 hostname specs git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@498 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/check_http.c b/plugins/check_http.c index 7678084f..e22560e2 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -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"); -- cgit v1.2.3-74-g34f1