From: Alan T. DeKok Date: Fri, 4 Nov 2016 18:09:34 +0000 (-0400) Subject: success may still return nothing. Should help with #1824 X-Git-Tag: release_3_0_13~120 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=2516fe5063ce2488289feddf04a20d699b58fe4f;p=freeradius.git success may still return nothing. Should help with #1824 --- diff --git a/src/modules/rlm_ldap/sasl.c b/src/modules/rlm_ldap/sasl.c index d71e5b1..c5edb5f 100644 --- a/src/modules/rlm_ldap/sasl.c +++ b/src/modules/rlm_ldap/sasl.c @@ -169,7 +169,8 @@ ldap_rcode_t rlm_ldap_sasl_interactive(rlm_ldap_t const *inst, REQUEST *request, if (((request && RDEBUG_ENABLED3) || DEBUG_ENABLED3) && result) { struct berval *srv_cred; - if (ldap_parse_sasl_bind_result(conn->handle, result, &srv_cred, 0) == 0) { + if ((ldap_parse_sasl_bind_result(conn->handle, result, &srv_cred, 0) == LDAP_SUCCESS) && + (srv_cred != NULL)) { char *escaped; escaped = fr_aprints(request, srv_cred->bv_val, srv_cred->bv_len, '\0');