Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: using "(void)" casts to purposefully ignore return values



On Wed, Aug 24, 2011 at 11:25:33AM +0930, Brett Lymn wrote:
> On Tue, Aug 23, 2011 at 06:12:24PM -0700, Greg A. Woods wrote:
> > 
> > So, e.g., most of the str*() family could be white-listed, plus many
> > others.
> > 
> 
> Nope, someone has not read the strlcat man page closely enough. If you
> screw up in just the right way strlcat WILL NOT null terminate a string.

You are mixing up strncat and strlcat. The former doesn't NUL-terminate,
the latter does explicitly in all but one case (n==0).

Joerg


Home | Main Index | Thread Index | Old Index