changeset: 6548:d3f31cf9239e
user:      Kevin McCarthy <[email protected]>
date:      Fri Jan 01 12:24:53 2016 -0800
link:      http://dev.mutt.org/hg/mutt/rev/d3f31cf9239e

Use strrchr to search for Received date separator. (closes #3798)

Sample email provided by the submitter showed a Received header with a
";" at the end of each line, instead of a single ";" in front of the
date.  The emails are obviously not RFC compliant, but the fix is
simple enough: find the last ";" using strrchr instead of the first.

diffs (12 lines):

diff -r cec45c0a405e -r d3f31cf9239e parse.c
--- a/parse.c   Fri Jan 01 12:16:27 2016 -0800
+++ b/parse.c   Fri Jan 01 12:24:53 2016 -0800
@@ -1180,7 +1180,7 @@
     {
       if (hdr && !hdr->received)
       {
-       char *d = strchr (p, ';');
+       char *d = strrchr (p, ';');
        
        if (d)
          hdr->received = mutt_parse_date (d + 1, NULL);

Reply via email to