[RESEND PATCH] smack: Replace kzalloc + strncpy with kstrndup

Kees Cook keescook at chromium.org
Tue Jun 7 19:18:21 UTC 2022


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 at huawei.com>

Reviewed-by: Kees Cook <keescook at chromium.org>

-- 
Kees Cook



More information about the Linux-security-module-archive mailing list