From: Kurt Zeilenga Date: Wed, 15 Mar 2000 19:42:03 +0000 (+0000) Subject: Add additional be_isroot() checks to protect against empty X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3146 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ad6882acac5f99c6400ec02f151a12d0abf74487;p=openldap Add additional be_isroot() checks to protect against empty root and client ndns. (the existing backend protections *should* be good enough, but one cannot be too safe) --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 1ad03e506d..9bdf4d2981 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -481,7 +481,11 @@ be_isroot( Backend *be, const char *ndn ) { int rc; - if ( ndn == NULL || be->be_root_ndn == NULL ) { + if ( ndn == NULL || *ndn == '\0' ) { + return( 0 ); + } + + if ( be->be_root_ndn == NULL || *be->be_root_ndn == '\0' ) { return( 0 ); }