From: Vsevolod Stakhov Date: Mon, 5 Oct 2020 18:52:37 +0000 (+0100) Subject: [Minor] Smtp_date: Fix 2 digits years between 00 and 49 X-Git-Tag: 2.7~262 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=11d962e46a919a0ff78cc4b7d168825991f0e400;p=rspamd.git [Minor] Smtp_date: Fix 2 digits years between 00 and 49 Suggested by: @citrin --- diff --git a/src/ragel/smtp_date.rl b/src/ragel/smtp_date.rl index 90c34b9de..e873e44de 100644 --- a/src/ragel/smtp_date.rl +++ b/src/ragel/smtp_date.rl @@ -29,7 +29,12 @@ gulong n; if (rspamd_strtoul (tmp, p - tmp, &n)) { if (n < 1000) { - tm.tm_year = n; + if (n < 50) { + tm.tm_year = n - 1900 + 2000; + } + else { + tm.tm_year = n; + } } else { tm.tm_year = n - 1900;