diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-03 07:48:30 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-03 07:48:30 +0000 |
commit | c306c8b3aef546e0584b8625176058956becc675 (patch) | |
tree | a4c5c70cb8065565fdd1163e59231c84c3493d4c /driver.c | |
parent | 430b2c897aaed5db7757e4a6c43b73514ac7ec41 (diff) | |
download | fetchmail-c306c8b3aef546e0584b8625176058956becc675.tar.gz fetchmail-c306c8b3aef546e0584b8625176058956becc675.tar.bz2 fetchmail-c306c8b3aef546e0584b8625176058956becc675.zip |
Avoid croaking on all-lower-case headers.
svn path=/trunk/; revision=207
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -357,13 +357,13 @@ int rewrite; if (!strncmp(bufp,"From ",5)) unixfrom = bufp; - else if (!strncmp("From: ", bufp, 6)) + else if (!strncasecmp("From: ", bufp, 6)) fromhdr = bufp; - else if (!strncmp("To: ", bufp, 4)) + else if (!strncasecmp("To: ", bufp, 4)) tohdr = bufp; - else if (!strncmp("Cc: ", bufp, 4)) + else if (!strncasecmp("Cc: ", bufp, 4)) cchdr = bufp; - else if (!strncmp("Bcc: ", bufp, 5)) + else if (!strncasecmp("Bcc: ", bufp, 5)) bcchdr = bufp; goto skipwrite; @@ -380,19 +380,19 @@ int rewrite; * a la sendmail -- crack all the destination headers * and send to every address we can reach via SMTP. */ - if ((cp = nxtaddr(tohdr)) != (char *)NULL) + if (tohdr && (cp = nxtaddr(tohdr)) != (char *)NULL) do { if (SMTP_rcpt(mboxfd, cp) == SM_UNRECOVERABLE) return(PS_SMTP); } while (cp = nxtaddr(NULL)); - if ((cp = nxtaddr(cchdr)) != (char *)NULL) + if (cchdr && (cp = nxtaddr(cchdr)) != (char *)NULL) do { if (SMTP_rcpt(mboxfd, cp) == SM_UNRECOVERABLE) return(PS_SMTP); } while (cp = nxtaddr(NULL)); - if ((cp = nxtaddr(bcchdr)) != (char *)NULL) + if (bcchdr && (cp = nxtaddr(bcchdr)) != (char *)NULL) do { if (SMTP_rcpt(mboxfd, cp) == SM_UNRECOVERABLE) return(PS_SMTP); |