From 625ced6e672daa892d334323cce6b3d42a6f929f Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 6 Sep 2018 11:41:13 +0900 Subject: 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. Signed-off-by: NIIBE Yutaka --- common/ssh-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/ssh-utils.c') 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++ = ':'; -- cgit v1.2.3