mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
dirmngr: Fix ldap-url.c.
* dirmngr/ldap-url.c (ldap_charray2str): Use memcpy instead of strncpy when length is computed by strlen beforhand. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
e08225030d
commit
a9b95b20a8
@ -346,12 +346,12 @@ char * ldap_charray2str( char **a, const char *sep )
|
|||||||
p = s;
|
p = s;
|
||||||
for ( v = a; *v != NULL; v++ ) {
|
for ( v = a; *v != NULL; v++ ) {
|
||||||
if ( v != a ) {
|
if ( v != a ) {
|
||||||
strncpy( p, sep, slen );
|
memcpy( p, sep, slen );
|
||||||
p += slen;
|
p += slen;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = strlen( *v );
|
len = strlen( *v );
|
||||||
strncpy( p, *v, len );
|
memcpy( p, *v, len );
|
||||||
p += len;
|
p += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user