commit c62d2b43ad4962ea44aa0c5edb4cc99cb83a413d (HEAD, refs/remotes/origin/v3.5, refs/heads/v3.5) Author: aaron-costello <56684862+aaron-costello@users.noreply.github.com> Date: 2019-11-22 02:44:29 +0000 ext_lm_group_acl: Improved username handling (#512) diff --git a/helpers/external_acl/LM_group/ext_lm_group_acl.cc b/helpers/external_acl/LM_group/ext_lm_group_acl.cc index def9db5..f93fc33 100644 --- a/helpers/external_acl/LM_group/ext_lm_group_acl.cc +++ b/helpers/external_acl/LM_group/ext_lm_group_acl.cc @@ -343,10 +343,10 @@ Valid_Global_Groups(char *UserName, const char **Groups) break; } if (domain_qualify == NULL) { - strcpy(User, NTDomain); - strcpy(NTDomain, DefaultDomain); + xstrncpy(User, NTDomain, sizeof(User)); + xstrncpy(NTDomain, DefaultDomain, sizeof(NTDomain)); } else { - strcpy(User, domain_qualify + 1); + xstrncpy(User, domain_qualify + 1, sizeof(User)); domain_qualify[0] = '\0'; strlwr(NTDomain); }