What's wrong with strlcpy? When I need one, I take the code from OpenBSD: http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib/...
Reasons for having it are surely not moronic because it provides security benefits.
What's wrong with strlcpy? When I need one, I take the code from OpenBSD: http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib/...
Reasons for having it are surely not moronic because it provides security benefits.
His issue was converting a whole lot of code over to strlcpy() while introducing bugs that didn't previously exist.
For another example of this kind of irrational thinking, look at NeoVim's massive churning changes to the Vim codebase for the purposes of "modernization".
We are generally very careful about "cleanup" patches in Neovim. Some examples:
https://github.com/neovim/neovim/pull/2418
https://github.com/neovim/neovim/pull/1788
https://github.com/neovim/neovim/pull/1340
At least one tangible benefit to some of these changes is that it allows us to enable -Wconversion.
We've also rejected dozens of cleanup patches for quality reasons.
I'm using Neovim currently and really enjoy that it supports stuff like 24 bit color schemes in the terminal. I finally can use color schemes which don't hurt my eyes.
EDIT: Or there is no NULL in src and it runs off into an unmapped page calculating the len :D Wow it's just a pretty bad idea for a lot of cases the more I think about it.
I'm not sure what Linus intended.
https://www.sourceware.org/ml/libc-alpha/2000-08/msg00061.ht...