[Date Prev][Date Next] [Chronological] [Thread] [Top]

segfault in ldap_back_search() with ENABLE_REWRITE (ITS#2825)



Full_Name: Tom Riddle
Version: 2.1.22
OS: Fedora Core 1.0
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (216.204.182.62)



ldap_back_search() does not handle the case where base == NULL:

#ifdef ENABLE_REWRITE
        switch ( rewrite_session( li->rwinfo, "searchBase",
                                base->bv_val, conn, &mbase.bv_val ) ) {
        case REWRITE_REGEXEC_OK:
                if ( mbase.bv_val == NULL ) {
                        mbase = *base;
                }
#ifdef NEW_LOGGING
                LDAP_LOG( BACK_LDAP, DETAIL1,
                        "[rw] searchBase: \"%s\" -> \"%s\"\n",
                        base->bv_val, mbase.bv_val, 0 );
#else /* !NEW_LOGGING */
                Debug( LDAP_DEBUG_ARGS, "rw> searchBase: \"%s\" -> \"%s\"\n%s",
                                base->bv_val, mbase.bv_val, "" );
#endif /* !NEW_LOGGING */