summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_http.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 2481935..901f6b6 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -1062,7 +1062,6 @@ check_http (void)
1062 1062
1063 1063
1064/* per RFC 2396 */ 1064/* per RFC 2396 */
1065#define HDR_LOCATION "%*[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]: "
1066#define URI_HTTP "%5[HTPShtps]" 1065#define URI_HTTP "%5[HTPShtps]"
1067#define URI_HOST "%255[-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]" 1066#define URI_HOST "%255[-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]"
1068#define URI_PORT "%6d" /* MAX_PORT's width is 5 chars, 6 to detect overflow */ 1067#define URI_PORT "%6d" /* MAX_PORT's width is 5 chars, 6 to detect overflow */
@@ -1092,7 +1091,7 @@ redir (char *pos, char *status_line)
1092 die (STATE_UNKNOWN, _("HTTP UNKNOWN - Could not allocate url\n")); 1091 die (STATE_UNKNOWN, _("HTTP UNKNOWN - Could not allocate url\n"));
1093 1092
1094 while (pos) { 1093 while (pos) {
1095 sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i); 1094 sscanf (pos, "%1[Ll]%*1[Oo]%*1[Cc]%*1[Aa]%*1[Tt]%*1[Ii]%*1[Oo]%*1[Nn]:%n", xx, &i);
1096 if (i == 0) { 1095 if (i == 0) {
1097 pos += (size_t) strcspn (pos, "\r\n"); 1096 pos += (size_t) strcspn (pos, "\r\n");
1098 pos += (size_t) strspn (pos, "\r\n"); 1097 pos += (size_t) strspn (pos, "\r\n");