From: Kurt Zeilenga Date: Sun, 9 Aug 1998 02:36:33 +0000 (+0000) Subject: LDAPworld P4: SLAPD Crash when Schema Checking X-Git-Tag: LDAP_3_3+prerelease~27^2~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fbdb748a7d10977271e00c2a6066e0d02e08fbee;p=openldap LDAPworld P4: SLAPD Crash when Schema Checking --- diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index ba16d9b0f1..a5c297fbe3 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -111,14 +111,16 @@ oc_check_allowed( char *type, struct berval **ocl ) /* if we know about the oc */ if ( (oc = oc_find( ocl[i]->bv_val )) != NULL ) { /* does it require the type? */ - for ( j = 0; oc->oc_required[j] != NULL; j++ ) { + for ( j = 0; oc->oc_required != NULL && + oc->oc_required[j] != NULL; j++ ) { if ( strcasecmp( oc->oc_required[j], type ) == 0 ) { return( 0 ); } } /* does it allow the type? */ - for ( j = 0; oc->oc_allowed[j] != NULL; j++ ) { + for ( j = 0; oc->oc_allowed != NULL && + oc->oc_allowed[j] != NULL; j++ ) { if ( strcasecmp( oc->oc_allowed[j], type ) == 0 || strcmp( oc->oc_allowed[j], "*" ) == 0 )