[git] GnuPG - branch, master, updated. gnupg-2.1.1-17-ged8383c

by Daniel Kahn Gillmor cvs at cvs.gnupg.org
Mon Dec 22 14:17:48 CET 2014


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  ed8383c618e124cfa708c9ee87563fcdf2f4649c (commit)
      from  b0b3803e8c2959dd67ca96debc54b5c6464f0d41 (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 ed8383c618e124cfa708c9ee87563fcdf2f4649c
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Dec 19 18:53:34 2014 -0500

    sm: Avoid double-free on iconv failure
    
    * sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid
    double-free of pwbuf.
    
    --
    
    Observed by Joshua Rogers <honey at internot.info>, who proposed a
    slightly different fix.
    
    Debian-Bug-Id: 773472
    
    Added fix at a second place - wk.

diff --git a/sm/minip12.c b/sm/minip12.c
index 01b91b7..ca4d248 100644
--- a/sm/minip12.c
+++ b/sm/minip12.c
@@ -2422,6 +2422,7 @@ p12_build (gcry_mpi_t *kparms, const void *cert, size_t certlen,
                      " requested charset '%s': %s\n",
                      charset, strerror (errno));
           gcry_free (pwbuf);
+          pwbuf = NULL;
           goto failure;
         }
 
@@ -2436,6 +2437,7 @@ p12_build (gcry_mpi_t *kparms, const void *cert, size_t certlen,
                      " requested charset '%s': %s\n",
                      charset, strerror (errno));
           gcry_free (pwbuf);
+          pwbuf = NULL;
           jnlib_iconv_close (cd);
           goto failure;
         }

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

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


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




More information about the Gnupg-commits mailing list