Author: uqs
Date: Thu May 27 12:59:49 2010
New Revision: 208592
URL: http://svn.freebsd.org/changeset/base/208592

Log:
  mail(1) misses addresses when replying to all
  
  There's a parsing error for fields where addresses are not separated by
  space. This is often produced by MS Outlook, eg.:
  Cc: <f...@bar.com>,"Mr Foo" <f...@baz.com>
  
  The following line now splits into the right tokens:
  Cc: f...@b.com,z...@y.de, <a...@a.de>,<c...@c.de>, "foo" <foo>,"bar" <bar>
  
  PR:           bin/131861
  Submitted by: Pete French <petefrench at ticketswitch.com>
  Tested by:    Pete French
  Reviewed by:  mikeh
  MFC after:    2 weeks

Modified:
  head/usr.bin/mail/util.c

Modified: head/usr.bin/mail/util.c
==============================================================================
--- head/usr.bin/mail/util.c    Thu May 27 12:54:42 2010        (r208591)
+++ head/usr.bin/mail/util.c    Thu May 27 12:59:49 2010        (r208592)
@@ -496,10 +496,11 @@ skin(name)
                                *cp2++ = ' ';
                        }
                        *cp2++ = c;
-                       if (c == ',' && *cp == ' ' && !gotlt) {
+                       if (c == ',' && !gotlt &&
+                           (*cp == ' ' || *cp == '"' || *cp == '<')) {
                                *cp2++ = ' ';
-                               while (*++cp == ' ')
-                                       ;
+                               while (*cp == ' ')
+                                       cp++;
                                lastsp = 0;
                                bufend = cp2;
                        }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to