Просмотр исходного кода

Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2008 f882894a-f735-0410-b71e-b25c423dba1c
Thomas Guyot-Sionnest 17 лет назад
Родитель
Сommit
8883581220
3 измененных файлов с 8 добавлено и 1 удалено
  1. 3 0
      NEWS
  2. 1 0
      THANKS.in
  3. 4 1
      plugins/check_http.c

+ 3 - 0
NEWS

@@ -1,5 +1,8 @@
 This file documents the major additions and syntax changes between releases.
 
+1.4.?? ??th ??? 200?
+	Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
+
 1.4.12 27th May 2008
 	Added ./check_nt -v INSTANCES to count number of instances (Alessandro Ren)
 	New check_icmp -s option to specify the source IP address

+ 1 - 0
THANKS.in

@@ -235,3 +235,4 @@ Matthias Urlichs
 Jan Wagner
 Christian Schneemann
 Rob Windsor
+Hilko Bengen

+ 4 - 1
plugins/check_http.c

@@ -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) {