aboutsummaryrefslogtreecommitdiffstats
path: root/common/ssh-utils.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2018-09-06 02:41:13 +0000
committerNIIBE Yutaka <[email protected]>2018-09-06 02:46:20 +0000
commitf0fdee2e24a25f57a84e1684984ce3921d923e0a (patch)
tree5515a6cbb7baa43e5c1b326e0e43bb7e72bf6a4a /common/ssh-utils.c
parentPost release updates. (diff)
downloadgnupg-f0fdee2e24a25f57a84e1684984ce3921d923e0a.tar.gz
gnupg-f0fdee2e24a25f57a84e1684984ce3921d923e0a.zip
Fix use of strncpy, which is actually good to use memcpy.
* common/ssh-utils.c (get_fingerprint): Use memcpy. * g10/build-packet.c (string_to_notation): Use memcpy. -- Cherry-pick of master commit of: 625ced6e672daa892d334323cce6b3d42a6f929f Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r--common/ssh-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ssh-utils.c b/common/ssh-utils.c
index 38d6e8aa2..013b28e5b 100644
--- a/common/ssh-utils.c
+++ b/common/ssh-utils.c
@@ -247,7 +247,7 @@ get_fingerprint (gcry_sexp_t key, int algo,
goto leave;
}
- strncpy (*r_fpr, algo_name, strlen (algo_name));
+ memcpy (*r_fpr, algo_name, strlen (algo_name));
fpr = (char *) *r_fpr + strlen (algo_name);
*fpr++ = ':';