diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-07-06 01:19:16 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-07-06 01:19:16 +0000 |
commit | e178572ff0edd064f4aa989bae1762b9ca1e9067 (patch) | |
tree | d79c71e61547a09d8df3e8b7a1110ee84a063ebe | |
parent | b3c53ae6f56d1e3710b0111bdb196e98ce2969ea (diff) | |
download | fetchmail-e178572ff0edd064f4aa989bae1762b9ca1e9067.tar.gz fetchmail-e178572ff0edd064f4aa989bae1762b9ca1e9067.tar.bz2 fetchmail-e178572ff0edd064f4aa989bae1762b9ca1e9067.zip |
Better backslash handling in RFC822 strings.
svn path=/trunk/; revision=3397
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | rfc822.c | 11 |
2 files changed, 11 insertions, 1 deletions
@@ -5,6 +5,7 @@ * Don't depend on having snprintf available. * Bug fix for envskip. * ODMR finally seems to be working. +* Handle multiple backslashes within RFC822 address strings correctly. fetchmail-5.8.11 (Sun Jul 1 21:39:26 EDT 2001), 20973 lines: @@ -145,7 +145,16 @@ const unsigned char *host; /* server hostname */ case 2: /* we're in a string */ if (*from == '"') - state = 1; + { + char *bp; + int bscount; + + bscount = 0; + for (bp = from - 1; *bp == '\\'; bp--) + bscount++; + if (bscount % 2) + state = 1; + } break; case 3: /* we're in a <>-enclosed address */ |