[git] GnuPG - branch, master, updated. gnupg-2.1.1-46-g6c87d1c

by Werner Koch cvs at cvs.gnupg.org
Mon Jan 26 17:59:45 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 Privacy Guard".

The branch, master has been updated
       via  6c87d1ce66d8e93e6c0f16c06116e9179f6158ba (commit)
      from  274d7b17a90908a90ba6ad295c08a79b287fc231 (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 6c87d1ce66d8e93e6c0f16c06116e9179f6158ba
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Jan 26 17:56:52 2015 +0100

    sm: Simplify fix ed8383c6
    
    * sm/minip12.c (p12_build): Release PWBUF only at the end.
    --
    
    Suggested-by: Eygene Ryabinkin <rea at codelabs.ru>
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/sm/minip12.c b/sm/minip12.c
index ca4d248..c70de8a 100644
--- a/sm/minip12.c
+++ b/sm/minip12.c
@@ -2421,8 +2421,6 @@ p12_build (gcry_mpi_t *kparms, const void *cert, size_t certlen,
           log_error ("can't convert passphrase to"
                      " requested charset '%s': %s\n",
                      charset, strerror (errno));
-          gcry_free (pwbuf);
-          pwbuf = NULL;
           goto failure;
         }
 
@@ -2436,8 +2434,6 @@ p12_build (gcry_mpi_t *kparms, const void *cert, size_t certlen,
           log_error ("error converting passphrase to"
                      " requested charset '%s': %s\n",
                      charset, strerror (errno));
-          gcry_free (pwbuf);
-          pwbuf = NULL;
           jnlib_iconv_close (cd);
           goto failure;
         }
@@ -2511,6 +2507,8 @@ p12_build (gcry_mpi_t *kparms, const void *cert, size_t certlen,
  failure:
   if (pwbuf)
     {
+      /* Note that wipememory is not really needed due to the use of
+         gcry_malloc_secure.  */
       wipememory (pwbuf, pwbufsize);
       gcry_free (pwbuf);
     }

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

Summary of changes:
 sm/minip12.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list