3 ms·
https://stackoverflow.com/questions/50724726/why-didnt-gcc-or-glibc-implement-s-functions https://stackoverflow.com/questions/50724726/why-didnt-gcc-o... We ca
by jimbob45 5y ago
https://stackoverflow.com/questions/50724726/why-didnt-gcc-or-glibc-implement-s-functions https://stackoverflow.com/questions/50724726/why-didnt-gcc-o...
We can't even agree on safe string functions for C, half a century later. You shouldn't have security bugs baked into the standard library and you shouldn't have to do a mountain of research to know which functions are safe and in which cases.
However, for most things non-string, non-pointer, and non-array, I agree with you.
- rurban 5y agoWe don't even have a string library in C. Strings are Unicode, not just zero-terminated buffers. You cannot find strings, nor compare them. In the kernel you have filesystems and login systems using unidentifiable names. Because the kernel has no identifier support. And for insecure standards, the committees rather want to eliminate the safe functions, than fixing the spec bugs or add u8 support.
- freedomben 5y agoIt's easy to say "You shouldn't have security bugs baked into the standard library" but it's a lot harder to say, "we're breaking decades worth of working code by removing some functions that have been part of the standard lib and were widely used."
- baby 5y agoI mean even an off by one is a security issue