Messages in this thread | | | Date | Tue, 21 Dec 2021 00:59:09 -0800 | From | Christoph Hellwig <> | 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@lst.de>
| |