[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YcGXXQhB8YUMXI3O@infradead.org>
Date: Tue, 21 Dec 2021 00:59:09 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Miko Larsson <mikoxyzzz@...il.com>
Cc: minchan@...nel.org, ngupta@...are.org, senozhatsky@...omium.org,
axboe@...nel.dk, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org, hch@...radead.org
Subject: Re: [PATCH v2 2/2] zram: zram_drv: replace 'strlcpy()'
On Fri, Dec 17, 2021 at 07:32:24AM +0100, Miko Larsson wrote:
> 'strlcpy()' shouldn't be used, and should be replaced with safer
> alternatives. Cristoph Hellwig suggested [1] that 'kmemdup_nul()' should
> be used in two cases instead of 'strscpy()', and that a regular
> 'strcpy()' should be used in the third case. [2][3]
Not that strcpy isn't really safer, but if your plan is to get rid
of strlcpy I think it makes more sense there.
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists