mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 635dfe95adedb8525df1d0865918790cdb55c412
parent ea32b6a45ede22e34eb0fc3ca9c703466bc1799d
Author: Leah Neukirchen <leah@vuxu.org>
Date:   Tue, 13 Jun 2017 17:18:05 +0200

blaze822: blaze822_addr: support backslashes in atoms

This happens a lot in the real world, even if it's not RFC conforming.

Diffstat:
blaze822.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/blaze822.c b/blaze822.c @@ -185,7 +185,7 @@ blaze822_addr(char *s, char **dispo, char **addro) } if (*s == '"') s++; - } else if (*s == '(') { + } else if (*s == '(') { // XXX recurse to conform? s++; if (!*addr) { // assume: user@host (name) @@ -202,6 +202,10 @@ blaze822_addr(char *s, char **dispo, char **addro) *c++ = *s++; if (*s == ')') s++; + } else if (*s == '\\') { + s++; + if (*s) + *c++ = *s++; } else if (*s == ':') { s++; while (iswsp(*s))