🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #1118

Re: logger(1) hiccups on % signs

#1118
From: Roy Smith
Date: Wed, 03 Aug 1988 13:55
24 lines
1166 bytes
In article <4653@fluke.COM> news@tc.fluke.COM (UNIX Network News) writes:
>         Change 
>             syslog(pri, buf);
>         to  
>             syslog(pri, "%s", buf);

	This should go on the list of "common insidious bugs" and a warning
be included in the man page for every printf and printf-like routine.  Didn't
I see essentially the same fix for bnews a while ago?  As I remember, it made
entries in a log file by doing
	
	printf (article_id)

instead of

	printf ("%s", article_id);

and went off the deep end when article ids with %'s in them started showing
up (probably from an andrew system).
-- 
Roy Smith, System Administrator
Public Health Research Institute
{allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net
"The connector is the network"
Technical Details
Message-ID: <3418@phri.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!ukma!nrl-cmf!cmcl2!phri!roy
References: <4653@fluke.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!ukma!nrl-cmf!cmcl2!phri!roy
From: roy@phri.UUCP (Roy Smith)
Newsgroups: comp.bugs.4bsd
Subject: Re: logger(1) hiccups on % signs
Message-ID: <3418@phri.UUCP>
Date: 3 Aug 88 13:55:36 GMT
References: <4653@fluke.COM>
Reply-To: roy@phri.UUCP (Roy Smith)
Organization: Public Health Research Inst. (NY, NY)
Lines: 24