mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
LDAPworld P4: SLAPD Crash when Schema Checking
This commit is contained in:
parent
8d5c2b41e6
commit
fbdb748a7d
1 changed files with 4 additions and 2 deletions
|
|
@ -111,14 +111,16 @@ oc_check_allowed( char *type, struct berval **ocl )
|
||||||
/* if we know about the oc */
|
/* if we know about the oc */
|
||||||
if ( (oc = oc_find( ocl[i]->bv_val )) != NULL ) {
|
if ( (oc = oc_find( ocl[i]->bv_val )) != NULL ) {
|
||||||
/* does it require the type? */
|
/* 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 )
|
if ( strcasecmp( oc->oc_required[j], type )
|
||||||
== 0 ) {
|
== 0 ) {
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* does it allow the type? */
|
/* 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 )
|
if ( strcasecmp( oc->oc_allowed[j], type )
|
||||||
== 0 || strcmp( oc->oc_allowed[j], "*" )
|
== 0 || strcmp( oc->oc_allowed[j], "*" )
|
||||||
== 0 )
|
== 0 )
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue