From: Luke Howard Date: Thu, 18 Aug 2005 04:34:04 +0000 (+0000) Subject: Check for NULL in be_match() X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~671 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2ff5c27f63c42ea73139e259384f91686c0b2e3b;p=openldap Check for NULL in be_match() Use be_match() in backend.c operational processing --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 7577bac1a0..18feb7df24 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1666,7 +1666,7 @@ fe_aux_operational( /* Let the overlays have a chance at this */ be_orig = op->o_bd; op->o_bd = select_backend( &op->o_req_ndn, 0, 0 ); - if ( op->o_bd != frontendDB && + if ( !be_match( op->o_bd, frontendDB ) && ( SLAP_OPATTRS( rs->sr_attr_flags ) || rs->sr_attrs ) && op->o_bd != NULL && op->o_bd->be_operational != NULL ) { diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 79d074b532..996cc7fdc9 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -297,7 +297,8 @@ LDAP_SLAPD_F (void) ava_free LDAP_P(( * backend.c */ -#define be_match( be1, be2 ) ( (be1) == (be2) || (be1)->be_nsuffix == (be2)->be_nsuffix ) +#define be_match( be1, be2 ) ( (be1) == (be2) || \ + ( (be1) && (be2) && (be1)->be_nsuffix == (be2)->be_nsuffix ) ) LDAP_SLAPD_F (int) backend_init LDAP_P((void)); LDAP_SLAPD_F (int) backend_add LDAP_P((BackendInfo *aBackendInfo));