[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: crasher in back-bdb/search.c



The doesn't fix it; csnf{eq,ge} are not initialized, I think thus
(op->o_clientupdate_type & SLAP_LCUP_SYNC) needs to be checked
before freeing these. I don't have time to look into this right
now though.

-- Luke


>From: Luke Howard <lukeh@PADL.COM>
>Subject: crasher in back-bdb/search.c
>To: openldap-devel@OpenLDAP.org
>Date: Mon, 16 Sep 2002 04:25:02 +1000
>Organization: PADL Software Pty Ltd
>Versions: dmail (bsd44) 2.4c/makemail 2.9d
>
>
>Fix attached.
>
>Index: search.c
>===================================================================
>RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb/search.c,v
>retrieving revision 1.78
>diff -u -r1.78 search.c
>--- search.c    13 Sep 2002 22:29:07 -0000      1.78
>+++ search.c    15 Sep 2002 18:23:42 -0000
>@@ -851,13 +851,15 @@
>                bdb_cache_return_entry_r ( bdb->bi_dbenv, &bdb->bi_cache, e, &lock );
>        }
> 
>-       if ( csnfeq.f_av_value.bv_val != NULL ) {
>+#ifdef LDAP_CLIENT_UPDATE
>+       if ( csnfeq.f_ava != NULL && csnfeq.f_av_value.bv_val != NULL ) {
>                ch_free( csnfeq.f_av_value.bv_val );
>        }
> 
>-       if ( csnfge.f_av_value.bv_val != NULL ) {
>+       if ( csnfge.f_ava != NULL && csnfge.f_av_value.bv_val != NULL ) {
>                ch_free( csnfge.f_av_value.bv_val );
>        }
>+#endif /* LDAP_CLIENT_UPDATE */
> 
>        LOCK_ID_FREE (bdb->bi_dbenv, locker );
>--
>Luke Howard | lukehoward.com
>PADL Software | www.padl.com

--
Luke Howard | lukehoward.com
PADL Software | www.padl.com