]> Pileus Git - ~andy/fetchmail/commitdiff
Handle "for" at end of line correctly.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 20 Nov 1998 07:49:04 +0000 (07:49 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 20 Nov 1998 07:49:04 +0000 (07:49 -0000)
svn path=/trunk/; revision=2188

driver.c

index 4d06f30d0d06b4c3255b63a814b0887dbeedec44..f13f7b01c78c0d04f0815249da9a5ca5461e7ce7 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -273,12 +273,14 @@ static char *parse_received(struct query *ctl, char *bufp)
            return(NULL);
        }
 
-       if ((ok = strstr(sp, "for ")) && isspace(ok[-1]))
+       if ((ok = strstr(sp, "for")) && isspace(ok[3]) && isspace(ok[-1]))
        {
            flag        want_gt = FALSE;
 
+           /* char after "for" could be space or a continuation newline */
+           for (sp = ok + 4; isspace(*sp); sp++)
+               continue;
            tp = rbuf;
-           sp = ok + 4;
            *tp++ = ':';        /* Here is the hack.  This is to be friends */
            *tp++ = ' ';        /* with nxtaddr()... */
            if (*sp == '<')