]> Pileus Git - ~andy/fetchmail/commitdiff
Don't strip last character of bare addresses.
authorMatthias Andree <matthias.andree@gmx.de>
Sat, 30 Jul 2005 23:37:30 +0000 (23:37 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sat, 30 Jul 2005 23:37:30 +0000 (23:37 -0000)
Clean up INSIDE_DQUOTE path.

svn path=/trunk/; revision=4193

NEWS
rfc822.c

diff --git a/NEWS b/NEWS
index f7e497213530cabb2dce55c8e208f016a7bfc0d4..807c2feedd3178c6b6f24755ab4128bba37fe2f7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -153,6 +153,8 @@ OTHER CHANGES:
   bug reports such as Debian Bug #224564. Matthias Andree
 * Rename lock_release to fm_lock_release, to avoid namespace collision on
   Darwin. NetBSD PR#28543 (pkg/28543). Matthias Andree.
+* The RFC-822 parser no longer strips the last character of bare addresses.
+  Matthias Andree
 
 fetchmail-6.2.5 (Wed Oct 15 18:39:22 EDT 2003), 23079 lines:
 
index 0fdc6a5ab4f1d73c794f973fa0399de29aacd097..8654816b03c02c5b647ae38d1752268ce675abd5 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
@@ -264,7 +264,6 @@ unsigned char *nxtaddr(const unsigned char *hdr /* header to be parsed, NUL to c
            state = ENDIT_ALL;
            if (tp)
            {
-               --tp;
                while (tp >= 0 && isspace(address[tp--]))
                    continue;
                address[++tp] = '\0';
@@ -346,13 +345,9 @@ unsigned char *nxtaddr(const unsigned char *hdr /* header to be parsed, NUL to c
            break;
 
        case INSIDE_DQUOTE:     /* we're in a quoted string, copy verbatim */
-           if (*hp != '"')
-               address[NEXTTP()] = *hp;
-           else
-           {
-               address[NEXTTP()] = *hp;
+           address[NEXTTP()] = *hp;
+           if (*hp == '"')
                state = oldstate;
-           }
            break;
 
        case INSIDE_PARENS:     /* we're in a parenthesized comment, ignore */