Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 2010 12:59:49 +0000 (UTC)
From:      Ulrich Spoerlein <uqs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208592 - head/usr.bin/mail
Message-ID:  <201005271259.o4RCxn2O077879@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@bar.com>,"Mr Foo" <foo@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;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005271259.o4RCxn2O077879>