[Pkg-gnupg-commit] [gnupg2] 32/159: sm: Handle gcry_pk_encrypt return value.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Jan 27 13:23:51 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 4ee881bff4c8fdfa4b3b7a4b7afab611471e97f1
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Tue Dec 15 12:38:25 2015 +0900
sm: Handle gcry_pk_encrypt return value.
* sm/encrypt.c (encrypt_dek): Don't ignore failure of gcry_pk_encrypt.
--
Thanks to Sami Farin.
GnuPG-bug-id: 2154
---
sm/encrypt.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sm/encrypt.c b/sm/encrypt.c
index 54a8bd1..c677a42 100644
--- a/sm/encrypt.c
+++ b/sm/encrypt.c
@@ -212,8 +212,11 @@ encrypt_dek (const DEK dek, ksba_cert_t cert, unsigned char **encval)
gcry_sexp_release (s_pkey);
/* Reformat it. */
- rc = make_canon_sexp (s_ciph, encval, NULL);
- gcry_sexp_release (s_ciph);
+ if (!rc)
+ {
+ rc = make_canon_sexp (s_ciph, encval, NULL);
+ gcry_sexp_release (s_ciph);
+ }
return rc;
}
--
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