]> git.sur5r.net Git - openldap/commitdiff
Add another safety check
authorKurt Zeilenga <kurt@openldap.org>
Tue, 27 Aug 2002 17:51:35 +0000 (17:51 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 27 Aug 2002 17:51:35 +0000 (17:51 +0000)
servers/slapd/schema_check.c

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