postnews() bug (2.10.3), with fix

der Mouse mouse at mcgill-vision.UUCP
Thu Aug 14 13:56:13 AEST 1986


There is a bug in 2.10.3 postnews that causes (some) moderated group
postings to be sent to inews directly, which results in their rejection
due to "unapproved moderated newsgroup".  This will occur when the
group's line in $LIB/moderators contains only spaces (no tabs) between
the newsgroup name and the moderator's address.  The problem is that
<ctype.h> rules that a space is a punctuation character.  In the
routine twosplit(), in postnews.c (old code commented in for loop):

	/*
	 * Split a line of the form
	 *		text whitespace text
	 * into two strings.	Also trim off any trailing newline.
	 * This is destructive on src.
	 */
	twosplit(src, dest1, dest2)
	char *src, *dest1, *dest2;
	{
[three lines deleted]
		for (p=src; !isspace(*p)/*isalnum(*p) || ispunct(*p)*/; p++)
			;
[five more lines deleted]
	}

This even makes the comment accurate!
-- 
					der Mouse

USA: {ihnp4,decvax,akgua,utzoo,etc}!utcsri!mcgill-vision!mouse
     think!mosart!mcgill-vision!mouse
Europe: mcvax!decvax!utcsri!mcgill-vision!mouse
ARPAnet: utcsri!mcgill-vision!mouse at uw-beaver.arpa

"Come with me a few minutes, mortal, and we shall talk."
			- Thanatos (Piers Anthony's Bearing an Hourglass)



More information about the Net.bugs mailing list