diff options
Diffstat (limited to 'plugins/check_http.c')
-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 856acde..d13050a 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -187,7 +187,7 @@ struct timeval tv; | |||
187 | #define URI_PATH "%[/a-zA-Z0-9._-=@,]" | 187 | #define URI_PATH "%[/a-zA-Z0-9._-=@,]" |
188 | 188 | ||
189 | enum { | 189 | enum { |
190 | MAX_IPV4_HOSTLENGTH = 64, | 190 | MAX_IPV4_HOSTLENGTH = 255, |
191 | HTTP_PORT = 80, | 191 | HTTP_PORT = 80, |
192 | HTTPS_PORT = 443 | 192 | HTTPS_PORT = 443 |
193 | }; | 193 | }; |
@@ -734,7 +734,7 @@ check_http (void) | |||
734 | asprintf (&orig_url, "%s", server_url); | 734 | asprintf (&orig_url, "%s", server_url); |
735 | pos = header; | 735 | pos = header; |
736 | while (pos) { | 736 | while (pos) { |
737 | server_address = realloc (server_address, MAX_IPV4_HOSTLENGTH); | 737 | server_address = realloc (server_address, MAX_IPV4_HOSTLENGTH + 1); |
738 | if (server_address == NULL) | 738 | if (server_address == NULL) |
739 | terminate (STATE_UNKNOWN, | 739 | terminate (STATE_UNKNOWN, |
740 | "HTTP UNKNOWN: could not allocate server_address"); | 740 | "HTTP UNKNOWN: could not allocate server_address"); |