diff options
author | Simo Sorce <idra@samba.org> | 2003-04-12 17:40:17 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-04-12 17:40:17 +0000 |
commit | d5135e98864e2a1bd33c17a468ffcfd95f07e3f2 (patch) | |
tree | b5d69295c2736b6049f6f4ed6eb81f42a03673ae | |
parent | e8ef094df381f491f869c175f1e63704c06487be (diff) | |
download | samba-d5135e98864e2a1bd33c17a468ffcfd95f07e3f2.tar.gz samba-d5135e98864e2a1bd33c17a468ffcfd95f07e3f2.tar.bz2 samba-d5135e98864e2a1bd33c17a468ffcfd95f07e3f2.zip |
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)
-rw-r--r-- | source3/smbd/reply.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 1c7e23a20f..b2dab2fea2 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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); |