]> git.sur5r.net Git - openldap/commitdiff
Do not crash if computed attribute has no values - necessary for range retrieval
authorLuke Howard <lukeh@openldap.org>
Sun, 20 Jun 2004 18:04:01 +0000 (18:04 +0000)
committerLuke Howard <lukeh@openldap.org>
Sun, 20 Jun 2004 18:04:01 +0000 (18:04 +0000)
support

servers/slapd/slapi/slapi_utils.c

index 984aea8bf08e2d2bf177a53593176c2faa906b33..862e703bcb4e0e67a07b7231b98e6e29d7a454f2 100644 (file)
@@ -3642,7 +3642,7 @@ int slapi_int_compute_output_ber(computed_attr_context *c, Slapi_Attr *a, Slapi_
                return 1;
        }
 
-       if ( !c->cac_attrsonly ) {
+       if ( !c->cac_attrsonly && a->a_vals != NULL ) {
                for ( i = 0; a->a_vals[i].bv_val != NULL; i++ ) {
                        if ( !access_allowed( op, e,
                                desc, &a->a_vals[i], ACL_READ, &c->cac_acl_state)) {