[1041] in Athena Bugs

home help back first fref pref prev next nref lref last post

[Jeff Stearns: logger(1) hiccups on % signs]

daemon@ATHENA.MIT.EDU (Ken Raeburn)
Sat Sep 24 02:45:06 1988

Date: Sat, 24 Sep 88 02:44:48 EDT
From: Ken Raeburn <raeburn@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU

suspect the same problem in our sources...

------- Forwarded Message

From: <raeburn@ATHENA.MIT.EDU>
Date: Sun, 7 Aug 88 02:30:10 EDT
To: raeburn@ATHENA.MIT.EDU

Path: bloom-beacon!mit-eddie!uw-beaver!fluke!news
From: news@tc.fluke.COM (UNIX Network News)
Newsgroups: comp.bugs.4bsd
Subject: logger(1) hiccups on % signs
Message-ID: <4653@fluke.COM>
Date: 3 Aug 88 01:43:05 GMT
Organization: John Fluke Mfg. Co., Inc., Everett, WA
Lines: 33

From: jeff@tc.fluke.COM (Jeff Stearns)
Path: fluke!jeff

Site:   John Fluke Mfg. Co., Inc.

Subject: logger(1) hiccups on % signs
 
Index:  ucb/logger UNIX 4.3BSD

Description:
        Logger(1) mishandles messages containing % signs, treating them as
        though they were printf(3) conversion specifiers.  As a result,
        randomly-formatted strings are logged.
         
        Sometimes you can provoke a core dump. 
 
Repeat-By:
        logger -t testing -p user.info 
        here comes a % sign 
        here come two %% signs
        100%flood insurance 18%dairy cows 5%light bulbs
        ^D
Fix:
        Change 
            syslog(pri, buf);
        to  
            syslog(pri, "%s", buf);
-- 
		 Jeff Stearns
	 Domain: jeff@tc.fluke.COM
	  Voice: +1 206 356 5064
    If you must: {uw-beaver,microsoft,sun}!fluke!jeff
	   USPS: John Fluke Mfg. Co. / P.O. Box C9090 / Everett WA  98206

------- End Forwarded Message

home help back first fref pref prev next nref lref last post