summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-04-13 23:45:35 +0000
committerTim Potter <tpot@samba.org>2003-04-13 23:45:35 +0000
commitc8cc8bb60c77a4908be2757c78972c51c2ff700d (patch)
treecb866f1569267a0def9dfebfd8c777bc886e773b /source3/smbd
parenta47d06a2c2c67cdc0b1dfc2d32df65f2b1bbeeda (diff)
downloadsamba-c8cc8bb60c77a4908be2757c78972c51c2ff700d.tar.gz
samba-c8cc8bb60c77a4908be2757c78972c51c2ff700d.tar.bz2
samba-c8cc8bb60c77a4908be2757c78972c51c2ff700d.zip
Merge of Simo's strncat -> StrnCpy fix.
(This used to be commit a2b1a7533ed997848f9dc0fcd1ffc3d4b4e8117d)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 0ccb4d0e9d..d655184042 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3104,11 +3104,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);