mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
add pedantic checks
This commit is contained in:
parent
53fca03374
commit
72c1b2f821
@ -1620,6 +1620,13 @@ syncrepl_message_to_op(
|
||||
op->o_tag = LBER_DEFAULT;
|
||||
op->o_bd = si->si_wbe;
|
||||
|
||||
if ( BER_BVISEMPTY( &bdn ) && !BER_BVISEMPTY( &op->o_bd->be_nsuffix[0] ) ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"syncrepl_message_to_op: %s got empty dn",
|
||||
si->si_ridtxt, 0, 0 );
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
|
||||
while (( rc = ldap_get_attribute_ber( si->si_ld, msg, ber, &bv, &bvals ) )
|
||||
== LDAP_SUCCESS ) {
|
||||
if ( bv.bv_val == NULL )
|
||||
@ -1857,6 +1864,13 @@ syncrepl_message_to_entry(
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( BER_BVISEMPTY( &bdn ) && !BER_BVISEMPTY( &op->o_bd->be_nsuffix[0] ) ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"syncrepl_message_to_entry: %s got empty dn",
|
||||
si->si_ridtxt, 0, 0 );
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
|
||||
if ( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_DELETE ) {
|
||||
/* NOTE: this could be done even before decoding the DN,
|
||||
* although encoding errors wouldn't be detected */
|
||||
|
Loading…
Reference in New Issue
Block a user