[Pkg-gnupg-commit] [gnupg2] 145/292: scd: Fix segfault changing key attr.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Nov 21 06:31:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 693e657ff04756737dce025203c0deba480ea8de
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Oct 21 16:27:46 2016 +0900

    scd: Fix segfault changing key attr.
    
    * asc/app-openpgp.c (change_keyattr_from_string): Release after
    allocated.
    --
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
 scd/app-openpgp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 0931095..f909c6f 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -2987,7 +2987,6 @@ change_keyattr_from_string (app_t app,
       size_t oid_len;
 
       oidstr = openpgp_curve_to_oid (string+n, NULL);
-      gcry_mpi_release (oid);
       if (!oidstr)
         {
           err = gpg_error (GPG_ERR_INV_DATA);
@@ -3005,6 +3004,7 @@ change_keyattr_from_string (app_t app,
       string[0] = algo;
       memcpy (string+1, oidbuf+1, oid_len-1);
       err = change_keyattr (app, keyno, string, oid_len, pincb, pincb_arg);
+      gcry_mpi_release (oid);
     }
   else
     err = gpg_error (GPG_ERR_PUBKEY_ALGO);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list