pstr — a Set of Cautious and Easy-To-Use C String Functions

from blog Vlad's Website, | ↗ original
The default C string handling functions have a lot of problems. The biggest of these issue is the fact that they are unsafe, in the sense that they can lead to buffer overflows by copying something past the end of a string. There are safer versions, such as strlcpy, but they also have their own issues, such as implicit truncation of strings. I...