From 288f0f4f6dab7e320fe354f4fc8cd25436e29fa3 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 27 Aug 2002 17:51:35 +0000 Subject: [PATCH] Add another safety check --- servers/slapd/schema_check.c | 5 +++++ 1 file changed, 5 insertions(+) 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 ) { -- 2.39.5