[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.8-14-g2809be1

[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  2809be1f97a447171a9e8b40079851740b15341a (commit)
      from  cca92ca5348999a3564dd54d7b0a103cc9e7640c (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 2809be1f97a447171a9e8b40079851740b15341a
Author: NIIBE Yutaka <[email protected]>
Date:   Tue Jul 3 09:07:03 2018 +0900

    g10: Fix memory leak for PKT_signature.
    
    * g10/getkey.c (buf_to_sig): Free by free_seckey_enc.
    * g10/gpgcompose.c (signature): Likewise.
    * g10/sign.c (write_signature_packets): Likewise.
    
    --
    
    Cherry picked from master commit:
        996febbab21eb9283b0634e51303a36b318734a6
    
    Reported-by: Philippe Antoine
    GnuPG-bug-id: 4047
    Signed-off-by: NIIBE Yutaka <[email protected]>

diff --git a/g10/getkey.c b/g10/getkey.c
index c77b409..7c407dd 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -3128,7 +3128,7 @@ buf_to_sig (const byte * buf, size_t len)
 
   if (parse_signature (iobuf, PKT_SIGNATURE, len, sig) != 0)
     {
-      xfree (sig);
+      free_seckey_enc (sig);
       sig = NULL;
     }
 
diff --git a/g10/gpgcompose.c b/g10/gpgcompose.c
index 2b42bfb..430538e 100644
--- a/g10/gpgcompose.c
+++ b/g10/gpgcompose.c
@@ -1835,7 +1835,7 @@ signature (const char *option, int argc, char *argv[], void *cookie)
   debug ("Wrote signature packet:\n");
   dump_component (&pkt);
 
-  xfree (sig);
+  free_seckey_enc (sig);
   release_kbnode (si.issuer_kb);
   xfree (si.revocation_key);
 
diff --git a/g10/sign.c b/g10/sign.c
index 4cf0cd3..095fa11 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -772,7 +772,7 @@ write_signature_packets (ctrl_t ctrl,
                        gpg_strerror (rc));
 	}
       else
-        xfree (sig);
+        free_seckey_enc (sig);
 
       if (rc)
         return rc;

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

Summary of changes:
 g10/getkey.c     | 2 +-
 g10/gpgcompose.c | 2 +-
 g10/sign.c       | 2 +-
 3 files changed, 3 insertions(+), 3 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.