]> git.sur5r.net Git - openldap/commitdiff
More for multival attrs
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 3 Nov 2016 22:50:26 +0000 (15:50 -0700)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 3 Nov 2016 22:50:26 +0000 (15:50 -0700)
check for enumerated delete that deletes all values

servers/slapd/back-mdb/modify.c

index fcabb2acfee4b869fd6290f4a8e9e1d24818065d..02c56952674dc3196463ff56264d324590917386 100644 (file)
@@ -232,11 +232,13 @@ do_del:
                                        }
                                        if ( mod->sm_numvals ) {
                                                anew = attr_find( e->e_attrs, mod->sm_desc );
-                                               if ( anew->a_numvals < mdb->mi_multi_lo ) {
-                                                       anew->a_flags ^= SLAP_ATTR_BIG_MULTI;
-                                                       anew = NULL;
-                                               } else {
-                                                       anew = (Attribute *)mod;
+                                               if ( anew ) {
+                                                       if ( anew->a_numvals < mdb->mi_multi_lo ) {
+                                                               anew->a_flags ^= SLAP_ATTR_BIG_MULTI;
+                                                               anew = NULL;
+                                                       } else {
+                                                               anew = (Attribute *)mod;
+                                                       }
                                                }
                                        } else {
                                                anew = NULL;