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 Thu, Aug 25, 2011 at 09:54:05AM +0930, Brett Lymn wrote:
 > > > 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).
 > I repeat.  Someone has not read the strlcat man page properly.
 > Seriously.  The belief that strlcat will always nul terminate is wrong.

If you pass an unterminated string to ~any other string function,
demons fly out of your nose. I'm not sure why you think there's
anything noteworthy about strlcpy's behavior in this case.

David A. Holland

Home | Main Index | Thread Index | Old Index