From 2147c854efe9fac300ab7095df8dfc6c943d3b15 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Tue, 10 Feb 2009 17:41:01 +0000 Subject: [PATCH] ITS#5937 --- CHANGES | 1 + libraries/libldap/tls_g.c | 2 +- libraries/libldap/tls_m.c | 2 +- libraries/libldap/tls_o.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 67cddd999b..38f72cedac 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ OpenLDAP 2.4.14 Engineering Fixed libldap peer cert memory leak (ITS#5849) Fixed libldap interaction with GnuTLS CN IP-based matches (ITS#5789) Fixed libldap intermediate response behavior (ITS#5896) + Fixed libldap IPv6 address handling (ITS#5937) Fixed libldap_r deref building (ITS#5768) Fixed libldap_r slapd lockup when paused during shutdown (ITS#5841) Added slapd syncrepl default retry setting (ITS#5825) diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c index a59e33a9ac..720b399475 100644 --- a/libraries/libldap/tls_g.c +++ b/libraries/libldap/tls_g.c @@ -575,7 +575,7 @@ tlsg_session_chkhost( LDAP *ld, tls_session *session, const char *name_in ) #ifdef LDAP_PF_INET6 if (name[0] == '[' && strchr(name, ']')) { char *n2 = ldap_strdup(name+1); - *strchr(n2, ']') = 2; + *strchr(n2, ']') = 0; if (inet_pton(AF_INET6, n2, &addr)) ntype = IS_IP6; LDAP_FREE(n2); diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c index 9735703054..93ab4ae0c6 100644 --- a/libraries/libldap/tls_m.c +++ b/libraries/libldap/tls_m.c @@ -404,7 +404,7 @@ tlsm_session_chkhost( LDAP *ld, tls_session *session, const char *name_in ) #ifdef LDAP_PF_INET6 if (name[0] == '[' && strchr(name, ']')) { char *n2 = ldap_strdup(name+1); - *strchr(n2, ']') = 2; + *strchr(n2, ']') = 0; if (inet_pton(AF_INET6, n2, &addr)) ntype = IS_IP6; LDAP_FREE(n2); diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c index fc4f9bc3d6..7936a2db14 100644 --- a/libraries/libldap/tls_o.c +++ b/libraries/libldap/tls_o.c @@ -494,7 +494,7 @@ tlso_session_chkhost( LDAP *ld, tls_session *sess, const char *name_in ) #ifdef LDAP_PF_INET6 if (name[0] == '[' && strchr(name, ']')) { char *n2 = ldap_strdup(name+1); - *strchr(n2, ']') = 2; + *strchr(n2, ']') = 0; if (inet_pton(AF_INET6, n2, &addr)) ntype = IS_IP6; LDAP_FREE(n2); -- 2.39.5