coverity fix, slapd_rw_apply NULL filter

This commit is contained in:
Howard Chu 2007-05-08 13:57:13 +00:00
parent f8c94e3155
commit b87965303e

View File

@ -1121,8 +1121,12 @@ slapd_rw_apply( void *private, const char *filter, struct berval *val )
ptr = op->ors_filterstr.bv_val = op->o_tmpalloc( rc + 1, op->o_tmpmemctx );
if ( sl->filter.bv_len ) {
ptr = lutil_strcopy( ptr, sl->filter.bv_val );
} else {
*ptr = '\0';
}
if ( filter ) {
strcpy( ptr, filter );
}
strcpy( ptr, filter );
op->ors_filter = str2filter_x( op, op->ors_filterstr.bv_val );
if ( !op->ors_filter ) {
op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );