From cc4299ea039972e57e219e2981b74967c133d41c Mon Sep 17 00:00:00 2001 From: Petr Vorel Date: Fri, 8 Oct 2021 11:14:30 +0200 Subject: ima: Use strscpy instead of strlcpy strlcpy is deprecated, use its safer replacement. Signed-off-by: Petr Vorel Signed-off-by: Mimi Zohar --- security/integrity/ima/ima_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'security/integrity/ima/ima_policy.c') diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index fd7df7f64544..320ca80aacab 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -870,7 +870,7 @@ static int __init ima_init_arch_policy(void) char rule[255]; int result; - result = strlcpy(rule, *rules, sizeof(rule)); + result = strscpy(rule, *rules, sizeof(rule)); INIT_LIST_HEAD(&arch_policy_entry[i].list); result = ima_parse_rule(rule, &arch_policy_entry[i]); -- cgit v1.2.3-59-g8ed1b