From 0a7ff283dcef5adbf9e6f5e8998c9061c4dbc1b3 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Fri, 21 Oct 2011 16:11:41 +0200 Subject: [PATCH] libcli-cldap: avoid the case local == remote == NULL (cherry picked from commit 4d2d33ee09941ddb211e21788c01d886730224c2) Signed-off-by: Stefan Metzmacher The last 2 patches address bug #8600 (cldap doesn't work over ipv6). (cherry picked from commit d8bc1584df47673ba7f6933af178f8669a61262b) --- libcli/cldap/cldap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c index 443292113ef..363ffbd1dc5 100644 --- a/libcli/cldap/cldap.c +++ b/libcli/cldap/cldap.c @@ -351,8 +351,12 @@ NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx, if (!local_addr) { /* - * Here we the address family of the remote address. + * Here we know the address family of the remote address. */ + if (fam == NULL) { + return NT_STATUS_INVALID_PARAMETER_MIX; + } + ret = tsocket_address_inet_from_strings(c, fam, NULL, 0, &any); -- 2.11.4.GIT