diff options
author | uqs <uqs@FreeBSD.org> | 2010-05-27 12:59:49 +0000 |
---|---|---|
committer | uqs <uqs@FreeBSD.org> | 2010-05-27 12:59:49 +0000 |
commit | 2053f035e3ff0b9e2012e34807e622138cb6ad86 (patch) | |
tree | 9e5df46a7ac209f99bc1c417fba97984b30192ea | |
parent | 754e02d7a8f49c7cbd0aa6bf0c98fdc0b53bc73b (diff) | |
download | FreeBSD-src-2053f035e3ff0b9e2012e34807e622138cb6ad86.zip FreeBSD-src-2053f035e3ff0b9e2012e34807e622138cb6ad86.tar.gz |
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
-rw-r--r-- | usr.bin/mail/util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mail/util.c b/usr.bin/mail/util.c index df2d840..d8778eb 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; } |