Commit fbdb748a authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

LDAPworld P4: SLAPD Crash when Schema Checking

parent 8d5c2b41
......@@ -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 )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment