From: Howard Chu Date: Fri, 5 Jul 2002 21:59:02 +0000 (+0000) Subject: ITS#1924 use GENERAL_NAMES_free instead of ext_free. X-Git-Tag: NO_SLAP_OP_BLOCKS~1386 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07ffaeaac814dae2ee595234a157ec5e753aa791;p=openldap ITS#1924 use GENERAL_NAMES_free instead of ext_free. --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 06d275eeb4..f215b752e1 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -161,12 +161,16 @@ sb_sasl_pkt_length( const unsigned char *buf, unsigned max, int debuglevel ) | buf[2] << 8 | buf[3]; - if ( size > max ) { + if ( size > SASL_MAX_BUFF_SIZE ) { /* somebody is trying to mess me up. */ ber_log_printf( LDAP_DEBUG_ANY, debuglevel, "sb_sasl_pkt_length: received illegal packet length " "of %lu bytes\n", (unsigned long)size ); size = 16; /* this should lead to an error. */ + } else if ( size > max ) { + ber_log_printf( LDAP_DEBUG_ANY, debuglevel, + "sb_sasl_pkt_length: received packet length " + "of %lu exceeds negotiated max of %lu bytes\n", (unsigned long)size, (unsigned long)max ); } return size + 4; /* include the size !!! */ diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index 5bfb832ede..f7f27bce46 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -953,7 +953,6 @@ ldap_pvt_tls_check_hostname( void *s, const char *name_in ) int n, len1, len2 = 0; char *domain; GENERAL_NAME *gn; - X509V3_EXT_METHOD *method; len1 = strlen(name); n = sk_GENERAL_NAME_num(alt); @@ -990,8 +989,7 @@ ldap_pvt_tls_check_hostname( void *s, const char *name_in ) } } - method = X509V3_EXT_get(ex); - method->ext_free(alt); + GENERAL_NAMES_free(alt); if (i < n) { /* Found a match */ ret = LDAP_SUCCESS; }