[Nagiosplug-checkins] nagiosplug/plugins check_smtp.c,1.44,1.45
Ton Voon
tonvoon at users.sourceforge.net
Mon Apr 4 11:25:08 CEST 2005
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21144
Modified Files:
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.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- check_smtp.c 4 Mar 2005 21:58:40 -0000 1.44
+++ check_smtp.c 4 Apr 2005 18:24:12 -0000 1.45
@@ -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