discard attribute values if attribute name cannot be parsed (ITS#5927)

This commit is contained in:
Pierangelo Masarati 2009-02-07 15:09:18 +00:00
parent 1bab6404f5
commit bdb121c967
2 changed files with 5 additions and 4 deletions

View File

@ -640,7 +640,7 @@ ldap_build_entry(
attr = attr_alloc( NULL );
if ( attr == NULL ) {
continue;
return LDAP_OTHER;
}
if ( slap_bv2ad( &a, &attr->a_desc, &text )
!= LDAP_SUCCESS )
@ -652,6 +652,8 @@ ldap_build_entry(
"%s ldap_build_entry: "
"slap_bv2undef_ad(%s): %s\n",
op->o_log_prefix, a.bv_val, text );
( void )ber_scanf( &ber, "x" /* [W] */ );
attr_free( attr );
continue;
}
@ -674,7 +676,6 @@ ldap_build_entry(
* present...
*/
( void )ber_scanf( &ber, "x" /* [W] */ );
attr_free( attr );
continue;
}

View File

@ -1830,7 +1830,7 @@ meta_send_entry(
}
attr = attr_alloc( NULL );
if ( attr == NULL ) {
continue;
return LDAP_OTHER;
}
if ( slap_bv2ad( &mapped, &attr->a_desc, &text )
!= LDAP_SUCCESS) {
@ -1846,6 +1846,7 @@ meta_send_entry(
mapped.bv_val, text );
Debug( LDAP_DEBUG_ANY, "%s", buf, 0, 0 );
( void )ber_scanf( &ber, "x" /* [W] */ );
attr_free( attr );
continue;
}
@ -1868,7 +1869,6 @@ meta_send_entry(
* present...
*/
( void )ber_scanf( &ber, "x" /* [W] */ );
attr_free(attr);
continue;
}