lkml.org 
[lkml]   [2018]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2018-01-14 23:18    [W:0.058 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site