]> git.sur5r.net Git - openldap/commitdiff
Don't crash if attr_find() fails (Howard, you might like to review this)
authorLuke Howard <lukeh@openldap.org>
Wed, 14 May 2003 07:25:00 +0000 (07:25 +0000)
committerLuke Howard <lukeh@openldap.org>
Wed, 14 May 2003 07:25:00 +0000 (07:25 +0000)
servers/slapd/back-bdb/modify.c

index 0bc2c2bb387a8627e52fe62c7d0a7b1644d54bae..f84f2074794edc75f1d7347f574b6734cb4e6349 100644 (file)
@@ -240,9 +240,13 @@ int bdb_modify_internal(
                        /* A nullified replace still does its delete action */
                        case LDAP_MOD_REPLACE | NULLIFIED:
                                ap = attr_find( save_attrs, ml->sml_desc );
-                               rc = bdb_index_values( op, tid, ap->a_desc,
-                                       ap->a_nvals,
-                                       e->e_id, SLAP_INDEX_DELETE_OP );
+                               if ( ap != NULL ) {
+                                       rc = bdb_index_values( op, tid, ap->a_desc,
+                                               ap->a_nvals,
+                                               e->e_id, SLAP_INDEX_DELETE_OP );
+                               } else {
+                                       rc = LDAP_SUCCESS;
+                               }
                                if ( rc || ml->sml_op == LDAP_MOD_DELETE ||
                                        (ml->sml_op & NULLIFIED))
                                        break;