🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #20151

Re: Diablo, DNews, and embedded NULs

#20151
From: Terry Kennedy
Date: Sun, 03 Aug 1997 00:00
54 lines
2522 bytes
Matt Dillon <dillon@best.net> writes:
>     Apparently a whole bunch of articles got sent from an alternet dialup
>     site with embedded NULs in them.

  I was seeing them from erols.

>     DNews does not appear to like embedded NULs.

  The Reference NNTP doesn't like them either. I've made the following change
to Reference NNTP 1.5.12.2 to deal with this. Note that this change *does*
alter articles in transit, but since the articles had the NULs inserted by a
news server that was trying to store articles in "wire format" the NULs them-
selves were not present in the original articles.

  Your line numbers may be offset if you apply this patch to vanilla
Reference NNTP 1.5.12.2 - I'm running something that's *very* different
(streaming, antispam, other stuff).

*** batch.c_orig	Sat Jul 27 18:08:45 1996
--- batch.c	Fri Aug  1 00:48:56 1997
***************
*** 201,206 ****
--- 201,207 ----
  	register char *cp, *realline;
  	char line[NNTP_STRLEN];
  	int toobig = NO;
+ 	register int i;
  
  	if (cont_code > 0) {
  		printf("%d Ok\r\n", cont_code);
***************
*** 216,221 ****
--- 217,230 ----
  #endif
  	cp = line; /* set it to anything non-NULL as a flag */
  	while (fgets(line, sizeof line, stdin) != NULL) {
+ 		for (i = 0; i < sizeof line; i++) {
+ 			if (line[i] == '\r' || line[i] == '\n')
+ 				break;
+ 			if (line[i] == '\0') {
+ 				syslog(LOG_ERR, "NULL in article %s", msg_id);
+ 				line[i] = ' ';
+ 			}
+ 		}
  		xfer_lines++;
  		if (cp != NULL) {
  		    if (line[0] == '.' && (line[1] == '\r' || line[1] == '\n'

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)

Technical Details
Message-ID: <EEBLpt.4BB@spcuna.spc.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <5s01i1$brt$1@flea.best.net>

Show Full Headers
Complete Article Headers
Message-ID: <EEBLpt.4BB@spcuna.spc.edu>
Subject: Re: Diablo, DNews, and embedded NULs
Date: Sun, 03 Aug 1997 00:00:00 +0000
From: Terry Kennedy <terry@spcuna.spc.edu>
References: <5s01i1$brt$1@flea.best.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 261908114
Distribution: best
X-Nntp-Posting-Host: spcuna.spc.edu
X-Complaints-To: Email abuse@spc.edu if this posting is inappropriate
X-Trace: spcuna.spc.edu 870582448 5038 terry [192.107.46.131]
Organization: St. Peter's College, US
Newsgroups: news.software.nntp