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 commit is contained in:
parent
741d5c3cd8
commit
c37467651b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user