mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Fix ldif_parse_line, binary attributes got truncated because the final
value was copied with ber_strdup.
This commit is contained in:
parent
00f6f9c59a
commit
835d0ebd63
1 changed files with 4 additions and 2 deletions
|
|
@ -223,14 +223,16 @@ done:
|
|||
}
|
||||
|
||||
if( !url && value != NULL ) {
|
||||
value = ber_strdup( value );
|
||||
if( value == NULL ) {
|
||||
p = ber_memalloc( vlen );
|
||||
if( p == NULL ) {
|
||||
ber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
|
||||
"ldif_parse_line: value malloc failed\n");
|
||||
ber_memfree( type );
|
||||
ber_memfree( freeme );
|
||||
return( -1 );
|
||||
}
|
||||
memcpy( p, value, vlen );
|
||||
value = p;
|
||||
}
|
||||
|
||||
ber_memfree( freeme );
|
||||
|
|
|
|||
Loading…
Reference in a new issue