mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
coverity fix, slapd_rw_apply NULL filter
This commit is contained in:
parent
f8c94e3155
commit
b87965303e
@ -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 New Issue
Block a user