aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mail
diff options
context:
space:
mode:
authorUlrich Spörlein <uqs@FreeBSD.org>2010-05-27 12:59:49 +0000
committerUlrich Spörlein <uqs@FreeBSD.org>2010-05-27 12:59:49 +0000
commita1d170a0b61aa2bf5fb5f73f294f29dda17442f4 (patch)
tree9e5df46a7ac209f99bc1c417fba97984b30192ea /usr.bin/mail
parent65872f8fb5f896447ec8939714a5fc0ffa4b15c0 (diff)
downloadsrc-a1d170a0b61aa2bf5fb5f73f294f29dda17442f4.tar.gz
src-a1d170a0b61aa2bf5fb5f73f294f29dda17442f4.zip
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
Notes
Notes: svn path=/head/; revision=208592
Diffstat (limited to 'usr.bin/mail')
-rw-r--r--usr.bin/mail/util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mail/util.c b/usr.bin/mail/util.c
index df2d840428bb..d8778ebe53c7 100644
--- a/usr.bin/mail/util.c
+++ b/usr.bin/mail/util.c
@@ -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;
}