]> git.sur5r.net Git - openldap/commitdiff
ITS#5937 fix ancient IPv6 typo
authorHoward Chu <hyc@openldap.org>
Tue, 10 Feb 2009 13:27:22 +0000 (13:27 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 10 Feb 2009 13:27:22 +0000 (13:27 +0000)
libraries/libldap/tls_g.c
libraries/libldap/tls_m.c
libraries/libldap/tls_o.c

index a59e33a9acf84799a6a7af396c5727ff31737925..720b399475379da7bf82c6c97f04ec8187c8d201 100644 (file)
@@ -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);
index 9735703054fe30310476a7b2ca4f2bd4698075ec..93ab4ae0c64f63d398f4405066f78adccad16795 100644 (file)
@@ -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);
index fc4f9bc3d6d44113aab80b831b2ae2a53ae28fdb..7936a2db14892d445cb826cb38fd0861c5bb3015 100644 (file)
@@ -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);