🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #1002

Buglet in nntpxmit.c (and fix)

#1002
From: Michael Haberler
Date: Fri, 22 Feb 1991 10:16
48 lines
2079 bytes

Our downstream feed got stuck recently with coredumps from nntpxmit, so
I had a look at it with the debugger. It died on trying to
syslog() the following message-id:

19910215.072910.cotrssm%navhost@sea04vm.navsea.navy.mil

which has meaning to sprintf() but no arguments to substitute. The
following patch takes care of this (nntp.1.5.8, it's still in 1.5.11, with
an 'if (skip == FALSE)' before the syslog()).

-michael

*** nntpxmit.c.ORIG	Fri Feb 22 10:40:32 1991
--- nntpxmit.c	Fri Feb 22 10:42:53 1991
***************
*** 1079,1085 ****
  	case L_WARNING:	importance = LOG_WARNING;	break;
  	default:	importance = LOG_DEBUG;		break;
  	}
! 	syslog(importance, error);
  #endif	SYSLOG
  }
  
--- 1079,1095 ----
  	case L_WARNING:	importance = LOG_WARNING;	break;
  	default:	importance = LOG_DEBUG;		break;
  	}
! #ifdef STALL_ON_WEIRD_MESSAGE_IDS
! 	syslog(importance, error); 
! 	/* this drops core with a message id like the
! 	 * following:
! 	 * <19910215.072910.cotrssm%navhost@sea04vm.navsea.navy.mil>
! 	 *                         ^^ here!!
! 	 * michael haberler mah@nestroy.wu-wien.ac.at
! 	 */
! #else
! 	syslog(importance, "%s", error);
! #endif
  #endif	SYSLOG
  }
  
-- 
Michael Haberler	mah@nestroy.wu-wien.ac.at, mah@awiwuw11.bitnet
University of Economics and Business Administration 
Augasse 2-6,  A-1090 Vienna, Austria		
Tel: +43 (222) 313-36 x4796 (9-18 CET) 	Fax 347-555
Technical Details
Message-ID: <1991Feb22.101644.23631@nestroy.wu-wien.ac.at>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!watserv1!watmath!att!linac!uwm.edu!caen!sdd.hp.com!spool.mu.edu!uunet!mcsun!tuvie!nestroy!mah

Show Full Headers
Complete Article Headers
Message-ID: <1991Feb22.101644.23631@nestroy.wu-wien.ac.at>
Subject: Buglet in nntpxmit.c (and fix)
Date: Fri, 22 Feb 1991 10:16:44 +0000
From: mah@nestroy.wu-wien.ac.at (Michael Haberler)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!watserv1!watmath!att!linac!uwm.edu!caen!sdd.hp.com!spool.mu.edu!uunet!mcsun!tuvie!nestroy!mah
Newsgroups: news.software.nntp
Reply-To: mah@nestroy.wu-wien.ac.at (Michael Haberler)
Organization: Wirtschaftsuniversitaet Wien
Lines: 47