aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 536b4008..0a8910c3 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -733,7 +733,10 @@ get_content_length (const char *headers)
/* Skip to the end of the header, including continuation lines. */
while (*s && !(*s == '\n' && (s[1] != ' ' && s[1] != '\t')))
s++;
- s++;
+
+ /* Avoid stepping over end-of-string marker */
+ if (*s)
+ s++;
/* Process this header. */
if (value && value > field+2) {