]> git.baikalelectronics.ru Git - kernel.git/commit
smack: Replace kzalloc + strncpy with kstrndup
authorGONG, Ruiqi <gongruiqi1@huawei.com>
Mon, 6 Jun 2022 08:17:14 +0000 (16:17 +0800)
committerCasey Schaufler <casey@schaufler-ca.com>
Mon, 1 Aug 2022 18:26:09 +0000 (11:26 -0700)
commit60e2bdc815c81b4af0efdffff8834d6388eaf967
tree6f983efef5d8cfc22f1e5b1c2f380db4fd922fc1
parentf040cca4b0da0180bf9de9141ef5c95f60f85182
smack: Replace kzalloc + strncpy with kstrndup

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@huawei.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
security/smack/smack_access.c