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

Re: ldapsearch core dump with 2.0.7 on Solaris 2.6

On Tue, Mar 13, 2001 at 05:43:10PM -0600, openldap-devel@thewrittenword.com wrote:
> From libraries/libldap/cyrus.c:
> int
> ldap_int_sasl_external(
>         LDAP *ld,
>         const char * authid,
>         ber_len_t ssf )
> {
>         int sc;
>         sasl_conn_t *ctx = ld->ld_defconn->lconn_sasl_ctx;
>         sasl_external_properties_t extprops;
>         if ( ctx == NULL ) {
>                 return LDAP_LOCAL_ERROR;
>         }

BTW, in some parts of cyrus.c, ld->ld_defconn is checked for the NULL
value before ld->ld_defconn->lconn_sasl_ctx is used. Should I do the
same here? FYI, I just added a check to the above code to 'return -1'
if ld->ld_defconn == NULL and I get a response from slapd (same
response as when using -H ldap://). Considering that
ldap_pvt_tls_start in tls.c discards the return value of
ldap_int_sasl_external, this is probably ok.

Should all uses of ld->ld_defconn->lconn_sasl_ctx have a check for
'ld->ld_defconn == NULL'? There are a few other places where
ld->ld_defconn->lconn_sasl_ctx is used without testing ld->ld_defconn
for NULL.

albert chin (china@thewrittenword.com)