[pkg-opensc-commit] [opensc] 12/295: fix #788 pkcs15-tool --read-ssh-key crash
Eric Dorland
eric at moszumanska.debian.org
Sat Jun 24 21:11:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository opensc.
commit d97ee793337e3590bed38426a0c46d095b087d48
Author: Nuno Goncalves <nunojpg at gmail.com>
Date: Mon Jun 6 18:29:03 2016 +0100
fix #788 pkcs15-tool --read-ssh-key crash
Don't try to free again pubkey if the parent cert has already been freed.
Signed-off-by: Nuno Goncalves <nunojpg at gmail.com>
---
src/tools/pkcs15-tool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tools/pkcs15-tool.c b/src/tools/pkcs15-tool.c
index 5b66320..5ec63c7 100644
--- a/src/tools/pkcs15-tool.c
+++ b/src/tools/pkcs15-tool.c
@@ -1051,8 +1051,8 @@ static int read_ssh_key(void)
fclose(outf);
if (cert)
sc_pkcs15_free_certificate(cert);
- sc_pkcs15_free_pubkey(pubkey);
-
+ else if (pubkey)
+ sc_pkcs15_free_pubkey(pubkey);
return 0;
fail:
printf("can't convert key: buffer too small\n");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git
More information about the pkg-opensc-commit
mailing list