Re: [RESEND PATCH] smack: Replace kzalloc + strncpy with kstrndup
From: Kees Cook
Date: Tue Jun 07 2022 - 22:22:12 EST
On Tue, Jun 07, 2022 at 05:36:49PM +0800, GONG, Ruiqi wrote:
> Simplify the code by using kstrndup instead of kzalloc and strncpy in
> smk_parse_smack(), which meanwhile remove strncpy as [1] suggests.
>
> [1]: https://github.com/KSPP/linux/issues/90
>
> Signed-off-by: GONG, Ruiqi <gongruiqi1@xxxxxxxxxx>
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
--
Kees Cook