On 10/29/18 2:59 PM, Rick Moen wrote:
FWIW, strncpy()/strncat() were a huge advance over strcpy()/strcat(), but also have their own problems: https://blog.liw.fi/posts/strncpy/ https://www.reddit.com/r/programming/comments/ifje6/strncpy_just_say_no/
They do, but that's not an excuse for using strcpy(). Which they did.
Author Lars Wirzenius (one of our Linux tribal elders!) recommends instead snprintf (but it has the problem of being slower than alternatives), or, better in his eyes, using a well-written helper library instead. (Lots more opinions at the Reddit thread.)
Helper libraries are awesome, as long as they are also well written. -- Daniel Taylor _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng