39 lines
1.1 KiB
Text
39 lines
1.1 KiB
Text
|
--- 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(<ime);
|
||
|
|
||
|
@@ -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",
|