aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_http.c4
1 files changed, 2 insertions, 2 deletions
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");