From: Howard Chu Date: Tue, 10 Feb 2009 13:27:22 +0000 (+0000) Subject: ITS#5937 fix ancient IPv6 typo X-Git-Tag: ACLCHECK_0~848 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b886c2ad8ade096aa0e4fad19a57c53a27315c85;p=openldap ITS#5937 fix ancient IPv6 typo --- 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);