mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 08:39:37 -05:00
Don't crash if no attributes in slapi_attr_value_find()
This commit is contained in:
parent
0864531e58
commit
13f0acfb6a
1 changed files with 4 additions and 1 deletions
|
|
@ -2512,6 +2512,9 @@ int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v )
|
|||
int rc;
|
||||
int ret;
|
||||
|
||||
if ( a ->a_vals == NULL ) {
|
||||
return -1;
|
||||
}
|
||||
mr = a->a_desc->ad_type->sat_equality;
|
||||
for ( bv = a->a_vals, j = 0; bv->bv_val != NULL; bv++, j++ ) {
|
||||
rc = value_match( &ret, a->a_desc, mr,
|
||||
|
|
@ -2523,7 +2526,7 @@ int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v )
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* LDAP_SLAPI */
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue