Messages in this thread | | | From | Linus Torvalds <> | Date | Mon, 8 Jan 2018 11:20:39 -0800 | Subject | Re: [GIT PULL] cgroup fixes for v4.15-rc7 |
| |
On Mon, Jan 8, 2018 at 6:52 AM, Tejun Heo <tj@kernel.org> wrote: > > There also are two patches to replace unlimited strcpy() usages with > strlcpy().
Christ, people.
strlcpy() is crap. It doesn't fix anything. If you have a untrusted source string, then strlcpy() does "strlen()" on the source, so it will overrun the source.
And if you don't have an untrusted source, why the hell are you using that function in the first place?
The interface was designed by morons on crack.
Use "strscpy()", which got this _right_.
We should probably just remove that sh*t-for-brains strlcpy() function. It's broken garbage.
Linus
| |