fixed segfault for uninitialized IsoApplet

fixes #400
This commit is contained in:
Frank Morgner 2015-07-27 18:43:51 +02:00
parent 6cfd71c387
commit b3dc5ea32a
1 changed files with 2 additions and 1 deletions

View File

@ -582,7 +582,8 @@ CK_RV C_InitToken(CK_SLOT_ID slotID,
goto out;
}
if (slot->p11card->framework->init_token == NULL) {
if (!slot->p11card || !slot->p11card->framework
|| !slot->p11card->framework->init_token) {
sc_log(context, "C_InitToken() not supported by framework");
rv = CKR_FUNCTION_NOT_SUPPORTED;
goto out;