[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210124040656.GB308988@casper.infradead.org>
Date: Sun, 24 Jan 2021 04:06:56 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Stephen Zhang <stephenzhangzsd@...il.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memfd: replace strcpy() by strscpy()
On Sun, Jan 24, 2021 at 10:23:37AM +0800, Stephen Zhang wrote:
> - strcpy(name, MFD_NAME_PREFIX);
> + strscpy(name, MFD_NAME_PREFIX, len + MFD_NAME_PREFIX_LEN);
This is silly. Use memcpy() if you must remove strcpy.
Powered by blists - more mailing lists