[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-297-gb9c02fb

by Justus Winter cvs at cvs.gnupg.org
Mon Dec 7 13:01:32 CET 2015


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  b9c02fbeb7efb7d0593b33485fb30c298291cf80 (commit)
       via  ca06cd7f77acb317c2649c58918908f043dfe6bd (commit)
      from  dd3d06e7f113cf7608f060ceb043262efd0b0c9d (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 b9c02fbeb7efb7d0593b33485fb30c298291cf80
Author: Justus Winter <justus at g10code.com>
Date:   Mon Dec 7 12:44:48 2015 +0100

    cipher: Improve error handling.
    
    * cipher/ecc.c (ecc_decrypt_raw): Improve error handling.
    --
    Found using the Clang Static Analyzer.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/cipher/ecc.c b/cipher/ecc.c
index e4e9139..105650e 100644
--- a/cipher/ecc.c
+++ b/cipher/ecc.c
@@ -1591,7 +1591,10 @@ ecc_decrypt_raw (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t keyparms)
         rawmpi = _gcry_mpi_get_buffer_extra (x, ec->nbits/8, -1,
                                              &rawmpilen, NULL);
         if (!rawmpi)
-          rc = gpg_err_code_from_syserror ();
+          {
+            rc = gpg_err_code_from_syserror ();
+            goto leave;
+          }
         else
           {
             rawmpi[0] = 0x40;

commit ca06cd7f77acb317c2649c58918908f043dfe6bd
Author: Justus Winter <justus at g10code.com>
Date:   Mon Dec 7 12:39:41 2015 +0100

    cipher: Initialize 'flags'.
    
    * cipher/ecc.c (ecc_encrypt_raw): Initialize 'flags' to 0.
    --
    Found using the Clang Static Analyzer.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/cipher/ecc.c b/cipher/ecc.c
index 51621f8..e4e9139 100644
--- a/cipher/ecc.c
+++ b/cipher/ecc.c
@@ -1242,7 +1242,7 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms)
   gcry_mpi_t data = NULL;
   ECC_public_key pk;
   mpi_ec_t ec = NULL;
-  int flags;
+  int flags = 0;
 
   memset (&pk, 0, sizeof pk);
   _gcry_pk_util_init_encoding_ctx (&ctx, PUBKEY_OP_ENCRYPT,

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

Summary of changes:
 cipher/ecc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


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


_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits




More information about the Gcrypt-devel mailing list