mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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 <gniibe@fsij.org>
This commit is contained in:
parent
23738c9530
commit
625ced6e67
2 changed files with 2 additions and 2 deletions
|
@ -1297,7 +1297,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue