mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 08:39:37 -05:00
Use memchr, not strlen, to look for embedded NULs.
This commit is contained in:
parent
dd12660a14
commit
427478a753
1 changed files with 2 additions and 2 deletions
|
|
@ -652,7 +652,7 @@ ldap_bv2dn( struct berval *bv, LDAPDN **dn, unsigned flags )
|
|||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
if( strlen( bv->bv_val ) != bv->bv_len ) {
|
||||
if( memchr( bv->bv_val, '\0', bv->bv_len ) != NULL ) {
|
||||
/* value must have embedded NULs */
|
||||
return LDAP_DECODING_ERROR;
|
||||
}
|
||||
|
|
@ -883,7 +883,7 @@ ldap_bv2rdn( struct berval *bv, LDAPRDN **rdn,
|
|||
|
||||
}
|
||||
|
||||
if( strlen( bv->bv_val ) != bv->bv_len ) {
|
||||
if( memchr( bv->bv_val, '\0', bv->bv_len ) != NULL ) {
|
||||
/* value must have embedded NULs */
|
||||
return LDAP_DECODING_ERROR;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue