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 06:14:10AM +0000, David Holland wrote:
> 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.

I really really wish people would read the man page properly before
pontificating.  If you pass a string that is longer than the size you
told strlcat then the dst will not be nul terminated, of course this is
a screw up, passing bad parameters to strlcat.  I just find it
annoying that people have blind faith that strlcat will always DTRT no
matter what.  This is not the case.

Brett Lymn
The information contained in this email and any attached files is
confidential to BAE Systems Australia. If you are not the intended
recipient, any use, disclosure or copying of this email or any
attachments is expressly prohibited.  If you have received this email
in error, please notify us immediately. VIRUS: Every care has been
taken to ensure this email and its attachments are virus free,
however, any loss or damage incurred in using this email is not the
sender's responsibility.  It is your responsibility to ensure virus
checks are completed before installing any data sent in this email to
your computer."

Home | Main Index | Thread Index | Old Index