[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-2-gf0fdee2

[email protected] (by NIIBE Yutaka)
Newsgroups gmane.comp.encryption.gpg.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-2-2 has been updated
       via  f0fdee2e24a25f57a84e1684984ce3921d923e0a (commit)
      from  4b5cddeb58915b634c041e3a7f0e3d0c807cf1bd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f0fdee2e24a25f57a84e1684984ce3921d923e0a
Author: NIIBE Yutaka <[email protected]>
Date:   Thu Sep 6 11:41:13 2018 +0900

    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]>

diff --git a/common/ssh-utils.c b/common/ssh-utils.c
index 38d6e8a..013b28e 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++ = ':';
 
diff --git a/g10/build-packet.c b/g10/build-packet.c
index d4a1d6a..b83ea84 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)

-----------------------------------------------------------------------

Summary of changes:
 common/ssh-utils.c | 2 +-
 g10/build-packet.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.