1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +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 c37467651becedf3e6b142b53d6675e973970249)
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); available_space = sizeof(pstring) - PTR_DIFF(pname2, name2);
StrnCpy(pname2, root2, available_space-1);
available_space -= strlen(root2);
if (ext2[0]) { if (ext2[0]) {
strncat(pname2, ".", available_space-1); snprintf(pname2, available_space - 1, "%s.%s", root2, ext2);
strncat(pname2, ext2, available_space-2); } else {
StrnCpy(pname2, root2, available_space - 1);
} }
return(True); return(True);