Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
pkcs11: parameter checking for 'get_mechanism_list'
fixes #409
  • Loading branch information
Frank Morgner authored and viktorTarasov committed Mar 29, 2015
1 parent 435291f commit c019a62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pkcs11/mechanism.c
Expand Up @@ -83,6 +83,9 @@ sc_pkcs11_get_mechanism_list(struct sc_pkcs11_card *p11card,
unsigned int n, count = 0;
int rv;

if (!p11card)
return CKR_TOKEN_NOT_PRESENT;

for (n = 0; n < p11card->nmechanisms; n++) {
if (!(mt = p11card->mechanisms[n]))
continue;
Expand Down

0 comments on commit c019a62

Please sign in to comment.