[Nagiosplug-checkins] nagiosplug/plugins check_smtp.c,1.43.2.1,1.43.2.2
Ton Voon
tonvoon at users.sourceforge.net
Mon Apr 4 11:24:12 CEST 2005
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20784
Modified Files:
Tag: r1_4-patches
check_smtp.c
Log Message:
Fix static buffer (Nikolay Sturm)
Index: check_smtp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v
retrieving revision 1.43.2.1
retrieving revision 1.43.2.2
diff -u -d -r1.43.2.1 -r1.43.2.2
--- check_smtp.c 4 Mar 2005 22:10:58 -0000 1.43.2.1
+++ check_smtp.c 4 Apr 2005 18:23:03 -0000 1.43.2.2
@@ -76,7 +76,7 @@
char regex_expect[MAX_INPUT_BUFFER] = "";
regex_t preg;
regmatch_t pmatch[10];
-char timestamp[10] = "";
+char timestamp[20] = "";
char errbuf[MAX_INPUT_BUFFER];
int cflags = REG_EXTENDED | REG_NOSUB | REG_NEWLINE;
int eflags = 0;
@@ -665,7 +665,7 @@
days_left = (mktime (&stamp) - time (NULL)) / 86400;
snprintf
- (timestamp, 16, "%02d/%02d/%04d %02d:%02d",
+ (timestamp, sizeof(timestamp), "%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 Commits
mailing list