[git] GnuPG - branch, master, updated. gnupg-2.2.7-167-g996febb

by NIIBE Yutaka cvs at cvs.gnupg.org
Tue Jul 3 02:15:56 CEST 2018


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, master has been updated
       via  996febbab21eb9283b0634e51303a36b318734a6 (commit)
      from  8a915cd9faf052b4faa3c415f2ac5aa8d6ea1efe (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 996febbab21eb9283b0634e51303a36b318734a6
Author: NIIBE Yutaka <gniibe at fsij.org>
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.
    
    --
    
    Reported-by: Philippe Antoine
    GnuPG-bug-id: 4047
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/getkey.c b/g10/getkey.c
index b111376..f0132bb 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -3142,7 +3142,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 094bc76..b3f7ecd 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 df71ccc..581a08f 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




More information about the Gnupg-commits mailing list