[Nagiosplug-devel] check_http formatting error for certificate checking

Bob Myers bob at intelenet.net
Thu Aug 21 20:13:37 CEST 2003


Patch against 1.3.99 distribution on SourceForge.  Problem exists in 
1.3.1, 1.3.99, r1_3_0-200308130007.

"16" truncates the string by 1 character.



--- check_http.c~       2003-08-10 05:07:08.000000000 -0700
+++ check_http.c        2003-08-20 11:34:58.000000000 -0700
@@ -920,7 +920,7 @@
 
        days_left = (mktime (&stamp) - time (NULL)) / 86400;
        snprintf
-               (timestamp, 16, "%02d/%02d/%04d %02d:%02d",
+               (timestamp, 17, "%02d/%02d/%04d %02d:%02d",
                 stamp.tm_mon + 1,
                 stamp.tm_mday, stamp.tm_year + 1900, stamp.tm_hour, 
stamp.tm_min);
 






More information about the Devel mailing list