Commit 7c9f63a6 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

fix subtree rename integrity; curiously enough, tes023 only failed on 64 bit...

fix subtree rename integrity; curiously enough, tes023 only failed on 64 bit arch; probably because we'd need to double the stack of the slab on 64 bit archs...
parent 9a00bbb3
......@@ -414,12 +414,15 @@ refint_search_cb(
if ( !BER_BVISEMPTY( &rq->newdn ) &&
b[i].bv_len != rq->oldndn.bv_len )
{
struct berval newsub, newdn;
struct berval newsub, newdn, olddn, oldndn;
/* if not first, save first as well */
if ( first != -1 ) {
ber_bvarray_add_x( &na->old_vals, &a->a_vals[first], op->o_tmpmemctx );
ber_bvarray_add_x( &na->old_nvals, &a->a_nvals[first], op->o_tmpmemctx );
ber_dupbv_x( &olddn, &a->a_vals[first], op->o_tmpmemctx );
ber_bvarray_add_x( &na->old_vals, &olddn, op->o_tmpmemctx );
ber_dupbv_x( &oldndn, &a->a_nvals[first], op->o_tmpmemctx );
ber_bvarray_add_x( &na->old_nvals, &oldndn, op->o_tmpmemctx );
newsub = a->a_vals[first];
newsub.bv_len -= rq->olddn.bv_len + 1;
......@@ -438,8 +441,10 @@ refint_search_cb(
first = -1;
}
ber_bvarray_add_x( &na->old_vals, &a->a_vals[i], op->o_tmpmemctx );
ber_bvarray_add_x( &na->old_nvals, &a->a_nvals[i], op->o_tmpmemctx );
ber_dupbv_x( &olddn, &a->a_vals[i], op->o_tmpmemctx );
ber_bvarray_add_x( &na->old_vals, &olddn, op->o_tmpmemctx );
ber_dupbv_x( &oldndn, &a->a_nvals[i], op->o_tmpmemctx );
ber_bvarray_add_x( &na->old_nvals, &oldndn, op->o_tmpmemctx );
newsub = a->a_vals[i];
newsub.bv_len -= rq->olddn.bv_len + 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment