From b5431929adfc464bb4d2ad16b012e2dc5deacd7e Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 12 Aug 2010 17:50:04 -0600 Subject: ber_printf 'o' cannot handle NULL bv_val The value passed to the char * argument to ber_printf 'o' must not be a NULL, even if the bv_len argument is 0. An empty string "" must be passed instead. --- ldap/servers/slapd/result.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c index 8e1e3187..ca42de52 100644 --- a/ldap/servers/slapd/result.c +++ b/ldap/servers/slapd/result.c @@ -240,7 +240,7 @@ check_and_send_extended_result(Slapi_PBlock *pb, ber_tag_t tag, BerElement *ber) if (rc != LBER_ERROR && exop_value != NULL) { rc = ber_printf( ber, "to", LDAP_TAG_EXOP_RES_VALUE, - exop_value->bv_val, + exop_value->bv_val ? exop_value->bv_val : "", exop_value->bv_len ); } } @@ -263,7 +263,7 @@ check_and_send_SASL_response(Slapi_PBlock *pb, ber_tag_t tag, BerElement *ber, C if ( bind_ret_saslcreds != NULL ) { rc = ber_printf( ber, "to", LDAP_TAG_SASL_RES_CREDS, - bind_ret_saslcreds->bv_val, + bind_ret_saslcreds->bv_val ? bind_ret_saslcreds->bv_val : "", bind_ret_saslcreds->bv_len ); } } -- cgit