logger(1) hiccups on % signs

UNIX Network News news at tc.fluke.COM
Wed Aug 3 11:43:05 AEST 1988


From: jeff at 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 at 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



More information about the Comp.bugs.4bsd.ucb-fixes mailing list