1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

strncat get sometimes optimized to strcat by glibc and that triggers our

"don't use strcat" define

reworked to snprintf
(This used to be commit c37467651b)
This commit is contained in:
Simo Sorce 2003-04-12 17:40:17 +00:00
parent e8ef094df3
commit d5135e9886

View File

@ -3101,11 +3101,10 @@ static BOOL resolve_wildcards(const char *name1, char *name2)
available_space = sizeof(pstring) - PTR_DIFF(pname2, name2);
StrnCpy(pname2, root2, available_space-1);
available_space -= strlen(root2);
if (ext2[0]) {
strncat(pname2, ".", available_space-1);
strncat(pname2, ext2, available_space-2);
snprintf(pname2, available_space - 1, "%s.%s", root2, ext2);
} else {
StrnCpy(pname2, root2, available_space - 1);
}
return(True);