Commit 835d0ebd authored by Howard Chu's avatar Howard Chu
Browse files

Fix ldif_parse_line, binary attributes got truncated because the final

value was copied with ber_strdup.
parent 00f6f9c5
......@@ -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 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment