From e1a086ad226f82381d6bdc3ddeab87a9fea23e08 Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Mon, 22 Apr 2024 22:33:45 -0500 Subject: [PATCH] fix insecure string copy --- pam_shield_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pam_shield_lib.c b/pam_shield_lib.c index 64e13f9..cc44099 100644 --- a/pam_shield_lib.c +++ b/pam_shield_lib.c @@ -172,7 +172,7 @@ name_list *new_name_list(char *name) { return NULL; memset(n, 0, sizeof(name_list)); - strcpy(n->name, name); + snprintf(n->name, sizeof(n->name), "%s", name); return n; }