Add another safety check

This commit is contained in:
Kurt Zeilenga 2002-08-27 17:51:35 +00:00
parent 9fa8eded08
commit 288f0f4f6d

View File

@ -548,6 +548,11 @@ int structural_class(
return LDAP_OBJECT_CLASS_VIOLATION; return LDAP_OBJECT_CLASS_VIOLATION;
} }
if( scn < 0 ) {
*text = "invalid structural object class";
return LDAP_OBJECT_CLASS_VIOLATION;
}
*scbv = ocs[scn]; *scbv = ocs[scn];
if( scbv->bv_len == 0 ) { if( scbv->bv_len == 0 ) {