diff options
author | Tim Potter <tpot@samba.org> | 2003-04-13 23:45:35 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-04-13 23:45:35 +0000 |
commit | c8cc8bb60c77a4908be2757c78972c51c2ff700d (patch) | |
tree | cb866f1569267a0def9dfebfd8c777bc886e773b /source3 | |
parent | a47d06a2c2c67cdc0b1dfc2d32df65f2b1bbeeda (diff) | |
download | samba-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')
-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 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); |