Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 1995 22:05:33 +0800 (WST)
From:      Peter Wemm <peter@jhome.DIALix.COM>
To:        CVS-commiters@freefall.freebsd.org, cvs-lib@freefall.freebsd.org
Subject:   Re: cvs commit: src/lib/libc/gen syslog.c
Message-ID:  <Pine.BSF.3.91.950915215901.950C-100000@jhome.DIALix.COM>
In-Reply-To: <199509151353.GAA02069@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 15 Sep 1995, Peter Wemm wrote:
> 
> peter       95/09/15 06:53:41
> 
>   Modified:    lib/libc/gen  syslog.c
>   Log:
>   Fix security bugs with a "new approach", using stdio's powerful buffer
>   control hooks.
>   It is similar to an unrolled multi-part snprintf(), in that a "FILE *" is
>   attached to a string buffer.  There is also an optimisation for the case
>   where the syslog format string does not contain %m, which should improve
>   performance of "informational" logging, like from ftpd.
> 

In case anybody looks over this and sees that tbuf is not null 
terminated, that is intentional.  In the original implementation it 
wasn't either, and I dont use tbuf as a "c-style string" anywhere.. It's
just a bunch of arbitary bytes.  fmt_cpy *is* used as a c-style string, 
and is null terminated.

Since this is attacking the problem from a different angle, it is 
possible that it might trip something up somewhere, but I've been running 
this (and earlier versions) in my libc for a while without any problems 
(other than mistakes caused by self inflicted stupidity.. :-).

-Peter




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.950915215901.950C-100000>