From a5355bb270e2e3e333146ff79ef06a60000d3bec Mon Sep 17 00:00:00 2001 From: Simon Schubert <2@0x2c.org> Date: Sat, 9 Jul 2011 02:34:53 +0200 Subject: [PATCH] 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 --- mail.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.47.3