From 1815f0298f33c949f78e181477e8474a37663ccd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Apr 2011 12:06:25 -0700 Subject: Remove fstrings from client struct. Properly talloc strings (ensuring we never end up with a NULL pointer). --- source3/winbindd/winbindd_cm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/winbindd') diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 166e2eda52..0bc791f451 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -816,7 +816,12 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain, (*cli)->timeout = 10000; /* 10 seconds */ (*cli)->fd = sockfd; - fstrcpy((*cli)->desthost, controller); + (*cli)->desthost = talloc_strdup((*cli), controller); + if ((*cli)->desthost == NULL) { + result = NT_STATUS_NO_MEMORY; + goto done; + } + (*cli)->use_kerberos = True; peeraddr_len = sizeof(peeraddr); -- cgit