mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 02:59:34 -05:00
ITS#1924 use GENERAL_NAMES_free instead of ext_free.
This commit is contained in:
parent
62139b6ef3
commit
07ffaeaac8
2 changed files with 6 additions and 4 deletions
|
|
@ -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 !!! */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue