From: Kurt Zeilenga Date: Tue, 27 Aug 2002 17:51:35 +0000 (+0000) Subject: Add another safety check X-Git-Tag: NO_SLAP_OP_BLOCKS~1157 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=288f0f4f6dab7e320fe354f4fc8cd25436e29fa3;p=openldap Add another safety check --- diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index 124b9a12bf..0412bb4f20 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -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 ) {