summaryrefslogtreecommitdiffstats
path: root/mail/dbmail22/files/patch-2.0.7_005_277
blob: b659de88aac486f793dcec0f098321233aa71fbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- imapcommands.c	(revision 1904)
+++ imapcommands.c	(revision 1905)
@@ -1787,6 +1787,8 @@
 	if (args[i + 1]) {
 		struct tm tm;
 
+		memset(&tm, 0, sizeof(struct tm));
+
 		if (strptime(args[i], "%d-%b-%Y %T", &tm) != NULL)
 			strftime(sqldate,
 				 sizeof(sqldate), "%Y-%m-%d %H:%M:%S",
--- imaputil.c	(revision 1904)
+++ imaputil.c	(revision 1905)
@@ -1788,13 +1788,14 @@
 	time_t ltime;
         char *last;
 
+	memset(&tm_sql_date, 0, sizeof(struct tm));
+	
         last = strptime(sqldate,"%Y-%m-%d %T", &tm_sql_date);
         if ( (last == NULL) || (*last != '\0') ) {
                 strcpy(_imapdate, IMAP_STANDARD_DATE);
                 return _imapdate;
         }
 
-	/* FIXME: this works fine on linux, but may cause dst offsets in netbsd. */
 	ltime = mktime (&tm_sql_date);
 	tm_imap_date = localtime(&ltime);
 
@@ -1814,6 +1815,8 @@
 	struct tm tm;
 	char *last_char;
 
+	memset(&tm, 0, sizeof(struct tm));
+
 	last_char = strptime(imapdate, "%d-%b-%Y", &tm);
 	if (last_char == NULL || *last_char != '\0') {
 		trace(TRACE_DEBUG, "%s,%s: error parsing IMAP date %s",
OpenPOWER on IntegriCloud