Secure Programming
Name:
Email:
*Note: Email address will appear as "user domain ext" to prevent harvesting.
Subject:
Message:
 
Re: Are bad developer libraries the problem with M$ software? Nov 18 2002 07:36PM
Casper Dik (Casper Dik Sun COM)

>As a side note, proper use of snprintf would be:
>ret = snprintf(mystr,sizeof(mystr)-1,"Format: %s",var);

No it would not; the proper 2nd argument is the size of whatever
"mystr" points to; for char[] that's sizeof (mystr) (NOT -1) but
for char * it's whatever size you alloc'ed.

>Perhaps we sho...

[ more ]  
 

Privacy Statement
Copyright 2010, SecurityFocus