From a8352c03b374125fcbcfdc4297060f9fc6f29bb7 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 29 Jan 2013 17:15:09 -0800 Subject: [PATCH] ITS#7473 fix b1a6f6980f2e5f17a39527069b27dfdc5ee73f8a uninit'd size in dn2id_walk, bogus pagedresults --- servers/slapd/back-mdb/dn2id.c | 1 + servers/slapd/back-mdb/search.c | 1 + 2 files changed, 2 insertions(+) diff --git a/servers/slapd/back-mdb/dn2id.c b/servers/slapd/back-mdb/dn2id.c index af003648af..1f2c4ea33e 100644 --- a/servers/slapd/back-mdb/dn2id.c +++ b/servers/slapd/back-mdb/dn2id.c @@ -835,6 +835,7 @@ mdb_dn2id_walk( key.mv_data = &isc->scopes[n].mid; key.mv_size = sizeof(ID); data.mv_data = isc->nrdns[n].bv_val - 2; + data.mv_size = 1; /* just needs to be non-zero, mdb_dup_compare doesn't care */ mdb_cursor_get( isc->mc, &key, &data, MDB_GET_BOTH ); continue; } diff --git a/servers/slapd/back-mdb/search.c b/servers/slapd/back-mdb/search.c index 3ea6c5d9c5..09bdf60c96 100644 --- a/servers/slapd/back-mdb/search.c +++ b/servers/slapd/back-mdb/search.c @@ -630,6 +630,7 @@ dn2entry_retry: } if ( id == (ID)ps->ps_cookie ) id = mdb_idl_next( candidates, &cursor ); + nsubs = ncand; /* always bypass scope'd search */ goto loop_begin; } if ( nsubs < ncand ) { -- 2.39.5