News for hackers. Stuff that matters.
Re:Strlcpy and strlcat added to glibc 2.38 by Gibbon1 on Tuesday July 18, 2023 @05:02AM (#36769685)
I'd be okay with renaming strcpy() to string_you_big_dummy_copy()
Re:Strlcpy and strlcat added to glibc 2.38 by notbeuller on Tuesday July 18, 2023 @10:29AM (#36772931)
You joke, but this is almost reasonable. When refactoring a large codebase riddled with strncpy, strcpy and strcmp, understanding unambiguously what code does shouldn't come down to my middle aged eyes being able to parse better than a compiler. I did a global search and replace with a #define, verified the object code diff'd against the original version, and never looked back.
Re:Strlcpy and strlcat added to glibc 2.38 by Gibbon1 on Tuesday July 18, 2023 @05:21PM (#36779269)
As usual I'm joking but somewhat serious. Step one is better replacement functions. Step two actually should be make the bad ones feel sleezy.

One thing I think is the problem with making safer string functions is it's hard to do that while staying at the same very low level of abstraction. And I think a lot of code out there sets up string functions to work off incomplete information. (here is a pointer to a string buffer, trust me it's big enough to hold what you'll stuff in it)