From c5b2532ace17da3e10429e80c1b5574e8b91f2e1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 25 Oct 1996 20:57:12 +0000 Subject: Fix delivery to MDAs. svn path=/trunk/; revision=384 --- driver.c | 4 ++-- fetchmail.c | 3 +-- fetchmail.h | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/driver.c b/driver.c index 43a1e161..7bd77e6b 100644 --- a/driver.c +++ b/driver.c @@ -547,8 +547,8 @@ struct hostrec *queryctl; /* query control record */ */ for (idp = xmit_names; idp; idp = idp->next) nlocals++; - sp = sargv = (char **)alloca(queryctl->mda_argcount + nlocals); - for (i = 0; i < queryctl->mda_argcount; i++) + sp = sargv = (char **)alloca(queryctl->mda_argcount+nlocals+2); + for (i = 0; i <= queryctl->mda_argcount; i++) *sp++ = queryctl->mda_argv[i]; for (idp = xmit_names; idp; idp = idp->next) *sp++ = idp->id; diff --git a/fetchmail.c b/fetchmail.c index c585bd03..369bc63f 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -231,8 +231,7 @@ char **argv; char *argp; /* punch nulls into the delimiting whitespace in the args */ - hostp->mda_argcount = 0; - for (argp = hostp->mdabuf, hostp->mda_argcount = 1; *argp != '\0'; hostp->mda_argcount++) + for (argp = hostp->mda, hostp->mda_argcount = 1; *argp != '\0'; hostp->mda_argcount++) { hostp->mda_argv[hostp->mda_argcount] = argp; while (!(*argp == '\0' || isspace(*argp))) diff --git a/fetchmail.h b/fetchmail.h index 3bfd5811..ce56f379 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -84,7 +84,6 @@ struct hostrec /* MDA arguments */ int mda_argcount; char *mda_argv[MDA_MAXARGS]; - char mdabuf[MDALEN+1]; /* control flags */ int keep; -- cgit v1.2.3