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

Re: segfault in ldap_back_search() with ENABLE_REWRITE (ITS#2825)



I assumed "base" would always be set; however,
code has been completely reworked in HEAD.
2.1.X will need a dedicated fix, I'll take care
of it asap.

Thanks, p.


> Full_Name: Tom Riddle
> Version: 2.1.22
> OS: Fedora Core 1.0
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (216.204.182.62)
>
>
>
> ldap_back_search() does not handle the case where base == NULL:
>
> #ifdef ENABLE_REWRITE
>         switch ( rewrite_session( li->rwinfo, "searchBase",
>                                 base->bv_val, conn, &mbase.bv_val ) ) {
>         case REWRITE_REGEXEC_OK:
>                 if ( mbase.bv_val == NULL ) {
>                         mbase = *base;
>                 }
> #ifdef NEW_LOGGING
>                 LDAP_LOG( BACK_LDAP, DETAIL1,
>                         "[rw] searchBase: \"%s\" -> \"%s\"\n",
>                         base->bv_val, mbase.bv_val, 0 );
> #else /* !NEW_LOGGING */
>                 Debug( LDAP_DEBUG_ARGS, "rw> searchBase: \"%s\" ->
> \"%s\"\n%s",
>                                 base->bv_val, mbase.bv_val, "" );
> #endif /* !NEW_LOGGING */


-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it