On 4/10/2015 12:31 PM, Scott Robison wrote:
> Note: In a project I was on a couple of years ago a contract programmer
> came through and replaced all the strcpy/strcat/etc usage with the
> Microsoft recommended strcpy_s/strcat_s/etc in the project. Problem was
> he did it wrong and the code was no more safe after it was modified than
> it had been previously. But at least the warnings went away!

Reminds me of all the times I saw someone replace strcpy(a,b) with
strncpy(a,b,strlen(b)) which is even worse yet recommended by our
bizarre coding standards, whereas the former is forbidden.  The review
board refused to listen to me when I explained in writing what was wrong
with this picture.

-- 
Andy Goth | <andrew.m.goth/at/gmail/dot/com>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
fossil-dev mailing list
fossil-dev@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to