[pkg-opensc-commit] [opensc] 231/295: pkcs11-tool: Do not use unitialized data when C_GetTokenInfo() failed
Eric Dorland
eric at moszumanska.debian.org
Sat Jun 24 21:11:35 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 1ca09b8f105d9e9ef6c237c924245ceec5d9c4c7
Author: Jakub Jelen <jjelen at redhat.com>
Date: Wed Apr 12 17:43:32 2017 +0200
pkcs11-tool: Do not use unitialized data when C_GetTokenInfo() failed
---
src/tools/pkcs11-tool.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/tools/pkcs11-tool.c b/src/tools/pkcs11-tool.c
index ef5d2a6..555029d 100644
--- a/src/tools/pkcs11-tool.c
+++ b/src/tools/pkcs11-tool.c
@@ -1105,6 +1105,9 @@ static void show_token(CK_SLOT_ID slot)
if (rv == CKR_TOKEN_NOT_RECOGNIZED) {
printf(" (token not recognized)\n");
return;
+ } else if (rv != CKR_OK) {
+ printf("C_GetTokenInfo() failed: rv = %s\n", CKR2Str(rv));
+ return;
}
if (!(info.flags & CKF_TOKEN_INITIALIZED) && (!verbose)) {
printf(" token state: uninitialized\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