From: Simon Schubert <2@0x2c.org> Date: Sat, 9 Jul 2011 00:34:53 +0000 (+0200) Subject: parse_addrs: fix parsing for multiple X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5355bb270e2e3e333146ff79ef06a60000d3bec;p=people%2Fms%2Fdma.git parse_addrs: fix parsing for multiple We would treat [,;] as address separator, triggering a new recipient. However, if the previous recipient was enclosed in , we already added this recipient. Fix this by skipping over [,;] if the current address is empty. Bug: #807712 --- diff --git a/mail.c b/mail.c index 3984439..e0a22af 100644 --- a/mail.c +++ b/mail.c @@ -290,6 +290,16 @@ again: case ',': case ';': + /* + * Next address, copy previous one. + * However, we might be directly after + * a
, or have two consecutive + * commas. + * Skip the comma unless there is + * really something to copy. + */ + if (ps->pos == 0) + goto skip; s++; goto newaddr;