diff --git a/plugins/check_http.c b/plugins/check_http.c
index 42636cd02c81b0e77f97cd3589ff090b8d97c112..07e0079e64b6035fae062004ec9044d6881c1f66 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
/* 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) {