From 7c6b599de6d7c0e10aa8bf6920ca07d94605e8c2 Mon Sep 17 00:00:00 2001 From: Landry Breuil Date: Thu, 13 Jun 2013 14:14:54 +0200 Subject: [PATCH] ITS#7580 Fix autogroup when no attrs in URI. Do not use lvals[], lnvals[] out of scope. --- contrib/slapd-modules/autogroup/autogroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/slapd-modules/autogroup/autogroup.c b/contrib/slapd-modules/autogroup/autogroup.c index 06e140789f..0be0f281f3 100644 --- a/contrib/slapd-modules/autogroup/autogroup.c +++ b/contrib/slapd-modules/autogroup/autogroup.c @@ -331,6 +331,7 @@ autogroup_member_search_cb( Operation *op, SlapReply *rs ) const char *text = NULL; char textbuf[1024]; struct berval *vals, *nvals; + struct berval lvals[ 2 ], lnvals[ 2 ]; int numvals; Debug(LDAP_DEBUG_TRACE, "==> autogroup_member_search_cb <%s>\n", @@ -347,7 +348,6 @@ autogroup_member_search_cb( Operation *op, SlapReply *rs ) return 0; } } else { - struct berval lvals[ 2 ], lnvals[ 2 ]; lvals[ 0 ] = rs->sr_entry->e_name; BER_BVZERO( &lvals[ 1 ] ); lnvals[ 0 ] = rs->sr_entry->e_nname; @@ -387,6 +387,7 @@ autogroup_member_search_modify_cb( Operation *op, SlapReply *rs ) autogroup_filter_t *agf = agg->agg_filter; Modifications *modlist; struct berval *vals, *nvals; + struct berval lvals[ 2 ], lnvals[ 2 ]; int numvals; Debug(LDAP_DEBUG_TRACE, "==> autogroup_member_search_modify_cb <%s>\n", @@ -403,7 +404,6 @@ autogroup_member_search_modify_cb( Operation *op, SlapReply *rs ) return 0; } } else { - struct berval lvals[ 2 ], lnvals[ 2 ]; lvals[ 0 ] = rs->sr_entry->e_name; BER_BVZERO( &lvals[ 1 ] ); lnvals[ 0 ] = rs->sr_entry->e_nname; -- 2.39.5