From d5135e98864e2a1bd33c17a468ffcfd95f07e3f2 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 12 Apr 2003 17:40:17 +0000 Subject: 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) --- source3/smbd/reply.c | 7 +++---- 1 file 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); -- cgit