Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 1995 10:42:25 +0300
From:      Heikki Suonsivu <hsu@clinet.fi>
To:        "Jonathan M. Bresler" <jmb@kryten.Atinc.COM>
Cc:        security@freebsd.org
Subject:   [8lgm]-Advisory-22.UNIX.syslog.2-Aug-1995 (fwd)
Message-ID:  <199508310742.KAA26949@katiska.clinet.fi>
In-Reply-To: <Pine.3.89.9508282325.D12292-0100000@kryten.atinc.com>
References:  <Pine.3.89.9508282325.D12292-0100000@kryten.atinc.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Jonathan M. Bresler writes:
 > buffers and uses sprintf to write to them.  should be changed to 
 > snprintf--a quick persual says that should do the trick

sprintf %s format takes maximum string length, like %.5s copies maximum of
5 characters.  This could also be used.  snprintf looses the end of the
thing printed, while %.ns only looses bytes from the offending string.

-- 
Heikki Suonsivu, T{ysikuu 10 C 83/02210 Espoo/FINLAND,
hsu@clinet.fi  home +358-0-8031121 work -4375209 fax -4555276



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508310742.KAA26949>