[Date Prev][Date Next] [Chronological] [Thread] [Top]

is_entry_objectclass() crasher (ITS#1572)



Full_Name: Luke Howard
Version: HEAD
OS: Darwin
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (193.248.94.233)


oc_bvfind() return value must be checked in oc.c. Otherwise an object class in
an entry for which schema is not loaded will cause slapd to crash. Fix below:

Index: oc.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/oc.c,v
retrieving revision 1.31
diff -u -r1.31 oc.c
--- oc.c        2002/01/19 01:58:00     1.31
+++ oc.c        2002/01/31 12:43:43
@@ -92,8 +92,9 @@
                if ( objectClass == oc && !set_flags ) {
                        return 1;
                }
-
-               e->e_ocflags |= objectClass->soc_flags;
+               if ( objectClass != NULL ) {
+                       e->e_ocflags |= objectClass->soc_flags;
+               }
        }
        e->e_ocflags |= SLAP_OC__END;   /* We've finished this */