svn commit: r208592 - head/usr.bin/mail

Ulrich Spoerlein uqs at FreeBSD.org
Thu May 27 12:59:49 UTC 2010


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: <foo at bar.com>,"Mr Foo" <foo at baz.com>
  
  The following line now splits into the right tokens:
  Cc: f at b.com,z at y.de, <a at a.de>,<c at 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;
 			}


More information about the svn-src-head mailing list