[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] 1.9.34 posting failed

Joshua Crawford <mortarn@xxxxxxxxxxxx> writes:

> I'm unable to post since upgrading to 1.9.34. My newsreader tells me it
> encountered an "Unknown Command." A file is created in out.going, containing
> only the Path: and Sender: lines.

I can see three bugs here, two in leafnode, one in your newsreader.

The newsreader sends a bogus "." (possibly left over from the failed
post) and leafnode rejects that "command". Please report this to the
manufacturer of your newsreader with the log below, removing the config:
lines, and tell them that the newsreader reconnected after leafnode
aborted itself.

Leafnode allocates too small a buffer when extracting the domain part
from the Message-ID, AND then checks if there is remaining data after
the extracted string (which is always there for proper Message-IDs: the
closing angle bracket).

My apologies, I didn't test passing a Message-ID in a POST, it's not a
mandatory header. I thought I'd let it settle for long enough. :-(

The patch below fixes the problem and is part of Leafnode 1.9.35, which
is due this hour.

To use the patch, save this mail to a file (make sure your mailer is
MIME aware), then cd to your leafnode 1.9.34 source directory and type:

patch </path/to/your/mail -p0

Make sure you replace /path/to/your/mail with the actual path where you
saved this mail :-)

Then proceed with ./configure (unless you configured leafnode before),
rm pcre_extract.o ; make ; make install

Index: pcre_extract.c
RCS file: /var/CVS/leafnode-1/pcre_extract.c,v
retrieving revision 1.5
diff -u -r1.5 pcre_extract.c
--- pcre_extract.c	18 Feb 2003 23:38:21 -0000	1.5
+++ pcre_extract.c	21 Feb 2003 00:08:23 -0000
@@ -97,8 +97,9 @@
 			    "pcre_extract: cannot handle copying NULL string, aborting.");
-		output[i] = critmalloc(l, "pcre_extract");
-		(void)xstrlcpy(output[i], input + ovec[i*2], l);
+		output[i] = critmalloc(l + 1, "pcre_extract");
+		(void)memcpy(output[i], input + ovec[i*2], l);
+		output[i][l] = '\0';

Matthias Andree
leafnode-1 download: http://sourceforge.net/projects/leafnode/
leafnode-1 docs/new: http://mandree.home.pages.de/leafnode/
leafnode-2 homepage: http://mandree.home.pages.de/leafnode/beta/

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list