3 ms·
Deficiencies in strl aside, most C programmers do not realize the target-padding that is going on with the strn family. Discussion is always good, but it will b
by apaprocki 15y ago
Deficiencies in strl aside, most C programmers do not realize the target-padding that is going on with the strn family. Discussion is always good, but it will be much more of an uphill battle to introduce new routines than it would be to get strn users to use strl. I've seen too many people bitten by declaring something like:
char buf[65536]; /* 64k is enough for everything! */
and using strncpy w/ sizeof(buf) to populate it.