]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/pcache.c
ITS#7588 fix possible NULL-deref in prev commit
[openldap] / servers / slapd / overlays / pcache.c
index b263d6194f59f626cbb99fb76788dac43c033441..1fa8d1ede429d10ce96fb3f1faf6c5f0ab386083 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2003-2012 The OpenLDAP Foundation.
+ * Copyright 2003-2013 The OpenLDAP Foundation.
  * Portions Copyright 2003 IBM Corporation.
  * Portions Copyright 2003-2009 Symas Corporation.
  * All rights reserved.
@@ -2438,6 +2438,7 @@ pcache_response(
 
        if ( si->swap_saved_attrs ) {
                rs->sr_attrs = si->save_attrs;
+               rs->sr_attr_flags = slap_attr_flags( si->save_attrs );
                op->ors_attrs = si->save_attrs;
        }
 
@@ -3210,6 +3211,10 @@ get_attr_set(
                int found = 1;
 
                if ( count > qm->attr_sets[i].count ) {
+                       if ( qm->attr_sets[i].count &&
+                               bvmatch( &qm->attr_sets[i].attrs[0].an_name, slap_bv_all_user_attrs )) {
+                               break;
+                       }
                        continue;
                }