diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2021-12-17 05:33:40 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2021-12-17 05:33:40 +0100 |
commit | a9b95b20a8c358d9f8743acfa1076c3be4ff0ac1 (patch) | |
tree | 20e6a429bde0952697736beebe419b56ea1192a9 | |
parent | w32: Prepare for the case gcrypt.h will not include winsock2.h. (diff) | |
download | gnupg2-a9b95b20a8c358d9f8743acfa1076c3be4ff0ac1.tar.xz gnupg2-a9b95b20a8c358d9f8743acfa1076c3be4ff0ac1.zip |
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>
-rw-r--r-- | dirmngr/ldap-url.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dirmngr/ldap-url.c b/dirmngr/ldap-url.c index 8308514d6..7268a4995 100644 --- a/dirmngr/ldap-url.c +++ b/dirmngr/ldap-url.c @@ -346,12 +346,12 @@ char * ldap_charray2str( char **a, const char *sep ) p = s; for ( v = a; *v != NULL; v++ ) { if ( v != a ) { - strncpy( p, sep, slen ); + memcpy( p, sep, slen ); p += slen; } len = strlen( *v ); - strncpy( p, *v, len ); + memcpy( p, *v, len ); p += len; } |