[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFzLYgX5WVAFASH65LkTtvSbn_g6eibxe1Psoc1Uc2hFkw@mail.gmail.com>
Date: Mon, 8 Jan 2018 11:20:39 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Tejun Heo <tj@...nel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Li Zefan <lizefan@...wei.com>,
Johannes Weiner <hannes@...xchg.org>,
cgroups <cgroups@...r.kernel.org>
Subject: Re: [GIT PULL] cgroup fixes for v4.15-rc7
On Mon, Jan 8, 2018 at 6:52 AM, Tejun Heo <tj@...nel.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
Powered by blists - more mailing lists