News for hackers. Stuff that matters.
Re:The Sad State of C Strings by asgfoi on Wednesday February 10, 2016 @02:53AM (#11071316)
That's nothing, you should see the sad sad state of strings in assembly... Oh you're supposed to manage them yourself? Huh, what a concept.

Seriously though, a C programmer should know the downsides of C strings, and act accordingly, i.e. use a library if necessary.

Re:The Sad State of C Strings by hyc_symas on Wednesday February 10, 2016 @12:55PM (#11074516)
"should" - yes. "does" - apparently not. "use a library if necessary" - that's really the point of this - the standard library's offerings suck. What is the point of a standard that is actually unusable?

strlcpy() also sucks. The solutions I proposed solve both the overflow protection aspect that strlcpy aims to solve and solves the inefficiency problems of strcpy/strcat/memcpy.