Commit 53338dc4 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix nul ('\0') string termination bug introduced by use of

memalloc/memcpy instead of strdup
parent c48155a1
......@@ -223,7 +223,7 @@ done:
}
if( !url && value != NULL ) {
p = ber_memalloc( vlen );
p = ber_memalloc( vlen + 1 );
if( p == NULL ) {
ber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
"ldif_parse_line: value malloc failed\n");
......@@ -232,6 +232,7 @@ done:
return( -1 );
}
memcpy( p, value, vlen );
p[vlen] = '\0';
value = p;
}
......
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