X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Ftls_g.c;h=40616f5e09baafe1541f4b439d65021aa37e5383;hb=6062cd9777bd2e1d9d99e5b3d5e25d0dab87f7ba;hp=17aca4c359a4b6214df6978beb3da1792e6db476;hpb=ca15238dfbd58d46126eb2bd91bc987f03207cd4;p=openldap
diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c
index 17aca4c359..40616f5e09 100644
--- a/libraries/libldap/tls_g.c
+++ b/libraries/libldap/tls_g.c
@@ -2,7 +2,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software .
*
- * Copyright 2008-2011 The OpenLDAP Foundation.
+ * Copyright 2008-2012 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* .
*/
/* ACKNOWLEDGEMENTS: GNUTLS support written by Howard Chu and
- * Matt Backes; sponsored by The Written Word (thewrittenword.com)
+ * Emily Backes; sponsored by The Written Word (thewrittenword.com)
* and Stanford University (stanford.edu).
*/
@@ -651,12 +651,8 @@ 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, ']') = 0;
- if (inet_pton(AF_INET6, n2, &addr))
- ntype = IS_IP6;
- LDAP_FREE(n2);
+ if (inet_pton(AF_INET6, name, &addr)) {
+ ntype = IS_IP6;
} else
#endif
if ((ptr = strrchr(name, '.')) && isdigit((unsigned char)ptr[1])) {