[pkg-opensc-commit] [opensc] 153/295: pkcs15-init: Fixed segfault
Eric Dorland
eric at moszumanska.debian.org
Sat Jun 24 21:11:26 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 5a9d7e1c42ceda2a1c062e8d87a15ee237e6b6d4
Author: Frank Morgner <frankmorgner at gmail.com>
Date: Thu Jan 5 16:28:04 2017 +0100
pkcs15-init: Fixed segfault
regression introduced in de7aaa4197cd5a3d97ed145716f75d9594158d2c
fixes https://github.com/OpenSC/OpenSC/issues/934
closes https://github.com/OpenSC/OpenSC/pull/935
---
src/tools/pkcs15-init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/tools/pkcs15-init.c b/src/tools/pkcs15-init.c
index 0bde324..c067345 100644
--- a/src/tools/pkcs15-init.c
+++ b/src/tools/pkcs15-init.c
@@ -751,11 +751,11 @@ do_erase_application(sc_card_t *in_card, struct sc_profile *profile)
static int do_finalize_card(sc_card_t *in_card, struct sc_profile *profile)
{
int r;
- r = sc_lock(p15card->card);
+ r = sc_lock(in_card);
if (r < 0)
return r;
r = sc_pkcs15init_finalize_card(in_card, profile);
- sc_unlock(p15card->card);
+ sc_unlock(in_card);
return r;
}
@@ -837,11 +837,11 @@ do_init_app(struct sc_profile *profile)
args.serial = (const char *) opt_serial;
args.label = opt_label;
- r = sc_lock(p15card->card);
+ r = sc_lock(card);
if (r < 0)
return r;
r = sc_pkcs15init_add_app(card, profile, &args);
- sc_unlock(p15card->card);
+ sc_unlock(card);
return r;
failed: fprintf(stderr, "Failed to read PIN: %s\n", sc_strerror(r));
--
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