aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-03 07:48:30 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-03 07:48:30 +0000
commitc306c8b3aef546e0584b8625176058956becc675 (patch)
treea4c5c70cb8065565fdd1163e59231c84c3493d4c
parent430b2c897aaed5db7757e4a6c43b73514ac7ec41 (diff)
downloadfetchmail-c306c8b3aef546e0584b8625176058956becc675.tar.gz
fetchmail-c306c8b3aef546e0584b8625176058956becc675.tar.bz2
fetchmail-c306c8b3aef546e0584b8625176058956becc675.zip
Avoid croaking on all-lower-case headers.
svn path=/trunk/; revision=207
-rw-r--r--driver.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/driver.c b/driver.c
index 7ff063b2..cd6712a2 100644
--- a/driver.c
+++ b/driver.c
@@ -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);