From: Vsevolod Stakhov Date: Wed, 21 Dec 2016 14:06:37 +0000 (+0000) Subject: [Minor] Avoid gmime in parsing time X-Git-Tag: 1.5.0~521 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d73a3db2211150ec12bd3c91e7e78b74b6ad19a0;p=rspamd.git [Minor] Avoid gmime in parsing time --- diff --git a/src/ragel/smtp_received_parser.rl b/src/ragel/smtp_received_parser.rl index cc4d37e0c..12b1c1b5c 100644 --- a/src/ragel/smtp_received_parser.rl +++ b/src/ragel/smtp_received_parser.rl @@ -254,14 +254,7 @@ } action Date_End { if (date_start && p > date_start) { - guint len; - char *tdate; - - len = p - date_start; - tdate = g_malloc (len + 1); - rspamd_strlcpy (tdate, date_start, len + 1); - rh->timestamp = g_mime_utils_header_decode_date (tdate, NULL); - g_free (tdate); + rh->timestamp = rspamd_tm_to_time (&tm, tz); } }