aboutsummaryrefslogtreecommitdiffstats
path: root/g10/build-packet.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 /g10/build-packet.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--g10/build-packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index d4a1d6a53..b83ea84a5 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -1266,7 +1266,7 @@ string_to_notation(const char *string,int is_utf8)
}
notation->name=xmalloc((s-string)+1);
- strncpy(notation->name,string,s-string);
+ memcpy(notation->name,string,s-string);
notation->name[s-string]='\0';
if(!saw_at && !opt.expert)