]> Pileus Git - ~andy/fetchmail/commitdiff
Al Youngwerth's fix for RFC822.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 3 Sep 1997 16:00:58 +0000 (16:00 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 3 Sep 1997 16:00:58 +0000 (16:00 -0000)
svn path=/trunk/; revision=1280

rfc822.c

index 0976c701e1274363fbfb17ab6dc7a7c4adb1c0b7..6539977dc987eb9ead3f5d817f3150828e7e63e9 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
@@ -163,8 +163,9 @@ const char *hdr;    /* header to be parsed, NUL to continue previous hdr */
        else if (HEADER_END(hp))
        {
            state = ENDIT_ALL;
-           while (isspace(*--tp))
-               continue;
+           if (tp > address)
+               while (isspace(*--tp))
+                   continue;
            *++tp = '\0';
            return(tp > address ? (tp = address) : (char *)NULL);
        }