nnrpd puts extra spaces on certain hearders on mailed to mederators articles
Jean Charles Delepine
delepine at u-picardie.fr
Mon May 17 22:06:57 UTC 2004
Russ Allbery <rra at stanford.edu> écrivait (wrote) :
> Jean Charles Delepine <delepine at u-picardie.fr> writes:
>
> > As you can see on <slrnca7rrs.qs1.fyr+news at nabab.fyrou.net> and others,
> > extra spaces are added to From, Newsgroups, ... headers.
>
> > One solution is to do the same thing in nnrpd/post.c/MailArticle() as in
> > nnrpd/post.c/SpoolitTo()
>
> This patch is trying a bit too hard. The following patch has already been
> committed upstream:
Fine.
So may I propose this patch to nnrpd/post.c/SpoolitTo() or did I miss
something ?
--- post.c.orig 2004-05-17 23:56:25.000000000 +0200
+++ post.c 2004-05-17 23:59:51.000000000 +0200
@@ -818,7 +818,6 @@
int i, fd;
char *tmpspool = NULL;
char *spoolfile = NULL;
- char *q;
/* Initialize the returned error message */
snprintf(CANTSPOOL, sizeof(CANTSPOOL),
@@ -841,17 +840,14 @@
/* Write the headers and a blank line. */
for (hp = Table; hp < ARRAY_END(Table); hp++)
if (hp->Value) {
- q = xstrndup(hp->Value, hp->Body - hp->Value + hp->Len);
if (*hp->Value == ' ' || *hp->Value == '\t')
- fprintf(F, "%s:%s\n", hp->Name, q);
+ fprintf(F, "%s:%s\n", hp->Name, hp->Value);
else
- fprintf(F, "%s: %s\n", hp->Name, q);
+ fprintf(F, "%s: %s\n", hp->Name, hp->Value);
if (FLUSH_ERROR(F)) {
fclose(F);
- free(q);
goto fail;
}
- free(q);
}
for (i = 0; i < OtherCount; i++) {
fprintf(F, "%s\n", OtherHeaders[i]);
More information about the inn-bugs
mailing list