mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-02 21:19:53 -05:00
Fix crasher in bvptr2obj
Fix hasvalue
This commit is contained in:
parent
307f7fcc89
commit
e59d248858
1 changed files with 3 additions and 1 deletions
|
|
@ -83,6 +83,8 @@ bvptr2obj(
|
|||
tmpberval[i].bv_val = bvptr[i]->bv_val;
|
||||
tmpberval[i].bv_len = bvptr[i]->bv_len;
|
||||
}
|
||||
tmpberval[i].bv_val = NULL;
|
||||
tmpberval[i].bv_len = 0;
|
||||
|
||||
if ( rc == LDAP_SUCCESS ) {
|
||||
*bvobj = tmpberval;
|
||||
|
|
@ -445,7 +447,7 @@ slapi_entry_attr_hasvalue( Slapi_Entry *e, const char *type, const char *value )
|
|||
bv.bv_val = (char *)value;
|
||||
bv.bv_len = strlen( value );
|
||||
|
||||
return slapi_attr_value_find( attr, &bv );
|
||||
return ( slapi_attr_value_find( attr, &bv ) != -1 );
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue