mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-16 20:06:06 -05:00
coverity fix, slapd_rw_apply NULL filter
This commit is contained in:
parent
f8c94e3155
commit
b87965303e
1 changed files with 5 additions and 1 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue