Commit c5623e56 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

import ITS#4283/4 segfault fixes from head

parent 440f1355
......@@ -569,7 +569,7 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s=%s)",
f->f_av_desc->ad_cname.bv_val,
tmp.bv_val );
tmp.bv_len ? tmp.bv_val : "(null)");
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
break;
......@@ -583,7 +583,7 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s>=%s)",
f->f_av_desc->ad_cname.bv_val,
tmp.bv_val );
tmp.bv_len ? tmp.bv_val : "(null)");
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
break;
......@@ -597,7 +597,7 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s<=%s)",
f->f_av_desc->ad_cname.bv_val,
tmp.bv_val );
tmp.bv_len ? tmp.bv_val : "(null)");
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
break;
......@@ -611,7 +611,7 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s~=%s)",
f->f_av_desc->ad_cname.bv_val,
tmp.bv_val );
tmp.bv_len ? tmp.bv_val : "(null)");
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
break;
......@@ -634,7 +634,7 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
snprintf( &fstr->bv_val[len-2], tmp.bv_len+3,
/* "(attr=" */ "%s*)",
tmp.bv_val );
tmp.bv_len ? tmp.bv_val : "(null)");
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
}
......@@ -651,7 +651,7 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
snprintf( &fstr->bv_val[len-1], tmp.bv_len+3,
/* "(attr=[init]*[any*]" */ "%s*)",
tmp.bv_val );
tmp.bv_len ? tmp.bv_val : "(null)");
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
}
}
......@@ -667,7 +667,7 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
snprintf( &fstr->bv_val[len-1], tmp.bv_len+3,
/* "(attr=[init*][any*]" */ "%s)",
tmp.bv_val );
tmp.bv_len ? tmp.bv_val : "(null)");
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
}
......@@ -732,7 +732,7 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
f->f_mr_dnattrs ? ":dn" : "",
f->f_mr_rule_text.bv_len ? ":" : "",
f->f_mr_rule_text.bv_len ? f->f_mr_rule_text.bv_val : "",
tmp.bv_val );
tmp.bv_len ? tmp.bv_val : "(null)");
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
} break;
......
......@@ -2055,7 +2055,8 @@ int slap_sasl_authorized( Operation *op,
Debug( LDAP_DEBUG_TRACE,
"==>slap_sasl_authorized: can %s become %s?\n",
authcDN->bv_val, authzDN->bv_val, 0 );
authcDN->bv_len ? authcDN->bv_val : "(null)",
authzDN->bv_len ? authzDN->bv_val : "(null)", 0 );
/* If person is authorizing to self, succeed */
if ( dn_match( authcDN, authzDN ) ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment