Code

Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
[nagiosplug.git] / plugins / check_http.c
index 42636cd02c81b0e77f97cd3589ff090b8d97c112..07e0079e64b6035fae062004ec9044d6881c1f66 100644 (file)
@@ -598,7 +598,10 @@ check_document_dates (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) {