diff options
-rw-r--r-- | plugins/check_http.c | 4 |
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; | |||
189 | #define URI_PATH "%[/a-zA-Z0-9._-=@,]" | 189 | #define URI_PATH "%[/a-zA-Z0-9._-=@,]" |
190 | 190 | ||
191 | enum { | 191 | enum { |
192 | MAX_IPV4_HOSTLENGTH = 64, | 192 | MAX_IPV4_HOSTLENGTH = 255, |
193 | HTTP_PORT = 80, | 193 | HTTP_PORT = 80, |
194 | HTTPS_PORT = 443 | 194 | HTTPS_PORT = 443 |
195 | }; | 195 | }; |
@@ -737,7 +737,7 @@ check_http (void) | |||
737 | asprintf (&orig_url, "%s", server_url); | 737 | asprintf (&orig_url, "%s", server_url); |
738 | pos = header; | 738 | pos = header; |
739 | while (pos) { | 739 | while (pos) { |
740 | server_address = realloc (server_address, MAX_IPV4_HOSTLENGTH); | 740 | server_address = realloc (server_address, MAX_IPV4_HOSTLENGTH + 1); |
741 | if (server_address == NULL) | 741 | if (server_address == NULL) |
742 | terminate (STATE_UNKNOWN, | 742 | terminate (STATE_UNKNOWN, |
743 | "HTTP UNKNOWN: could not allocate server_address"); | 743 | "HTTP UNKNOWN: could not allocate server_address"); |