]> git.sur5r.net Git - openldap/commitdiff
ITS#1924 use GENERAL_NAMES_free instead of ext_free.
authorHoward Chu <hyc@openldap.org>
Fri, 5 Jul 2002 21:59:02 +0000 (21:59 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 5 Jul 2002 21:59:02 +0000 (21:59 +0000)
libraries/libldap/cyrus.c
libraries/libldap/tls.c

index 06d275eeb4865c783742c5d8e8f24dc003eca865..f215b752e16616de51068a4d564b663cc2f3564a 100644 (file)
@@ -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 !!! */
index 5bfb832ede0dc634143cf550d8dc18d924ae1a73..f7f27bce46d01ca1bc1e61d88da6d6c445bcea92 100644 (file)
@@ -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;
                        }