Files
org-hyperion-cules/ltdl.c
Fish (David B. Trout) e184143427 Use strlcat, NOT strncat! (strncat is not safe!)
Too many programmers forget argument 3 is NOT the size of the destination buffer but rather the maximum number of chars to append. They also tend to forget the destination buffer will NOT be NULL terminated if not enough room remains. Buffer overflows are very common with strncat. Our "strlcat" function on the other hand, ensures the destination buffer will NEVER overflow and will ALWAYS be NULL terminated. Note too, however, strlcat does NOT return char* either, but rather the new new updated strlen of destination.
2014-10-27 03:56:38 -07:00

101 KiB