[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-185-g2b5bbe2

by NIIBE Yutaka cvs at cvs.gnupg.org
Fri Aug 9 01:59:51 CEST 2013


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 crypto library".

The branch, master has been updated
       via  2b5bbe264fcd61e5e458e5f71a6507ba0271c729 (commit)
      from  426cbc9feca0c8f46208fb3670adab95f9e46087 (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 2b5bbe264fcd61e5e458e5f71a6507ba0271c729
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Aug 9 08:26:27 2013 +0900

    cipher: fix memory leak.
    
    * cipher/pubkey.c (gcry_pk_sign): Handle the specific case of ECC,
    where there is NULL whichi is not the sentinel.
    
    --
    
    This is a kind of makeshift fix, but the MPI array API is internal
    only and will be removed, it is better not to change API now.

diff --git a/cipher/pubkey.c b/cipher/pubkey.c
index e867169..e6c1cf6 100644
--- a/cipher/pubkey.c
+++ b/cipher/pubkey.c
@@ -3339,7 +3339,16 @@ gcry_pk_sign (gcry_sexp_t *r_sig, gcry_sexp_t s_hash, gcry_sexp_t s_skey)
  leave:
   if (skey)
     {
-      release_mpi_array (skey);
+      if (is_ecc)
+        /* Q is optional and may be NULL, while there is D after Q.  */
+        for (i = 0; i < 7; i++)
+          {
+            if (skey[i])
+              mpi_free (skey[i]);
+            skey[i] = NULL;
+          }
+      else
+        release_mpi_array (skey);
       gcry_free (skey);
     }
 

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

Summary of changes:
 cipher/pubkey.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org




More information about the Gnupg-commits mailing list