From: Luke Howard Date: Wed, 14 May 2003 07:25:00 +0000 (+0000) Subject: Don't crash if attr_find() fails (Howard, you might like to review this) X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~139 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ac7ac5acefdf859251a37274167200374d37cba9;p=openldap Don't crash if attr_find() fails (Howard, you might like to review this) --- diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index 0bc2c2bb38..f84f207479 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -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;