From: Howard Chu Date: Tue, 6 May 2008 03:03:47 +0000 (+0000) Subject: ITS#5486, fix rev 1.219. Must never use s_op directly, must always use X-Git-Tag: LOCKER_IDS~178 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=198b14be906f483f0bb3c1732439790d78c012bf;p=openldap ITS#5486, fix rev 1.219. Must never use s_op directly, must always use a copy. --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 0551f1e933..93bb5ae08d 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -1176,6 +1176,7 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit ) for (ss = si->si_ops, sprev = (syncops *)&si->si_ops; ss; sprev = ss, ss=snext) { + Operation op2; syncmatches *sm; int found = 0; @@ -1223,8 +1224,11 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit ) } } + if ( fc.fscope ) + op2 = *ss->s_op; + /* check if current o_req_dn is in scope and matches filter */ - if ( fc.fscope && test_filter( ss->s_op, e, ss->s_op->ors_filter ) == + if ( fc.fscope && test_filter( &op2, e, ss->s_op->ors_filter ) == LDAP_COMPARE_TRUE ) { if ( saveit ) { sm = op->o_tmpalloc( sizeof(syncmatches), op->o_tmpmemctx );