fixed bad string comparison

fixes #547
This commit is contained in:
Frank Morgner 2015-09-10 08:31:30 +02:00
parent b0c1e1fc89
commit 6e3f94b3c9
1 changed files with 3 additions and 2 deletions

View File

@ -424,8 +424,9 @@ fix_starcos_pkcs15_card(struct sc_pkcs15_card *p15card)
if (strcmp(p15card->card->driver->short_name,"cardos") == 0) {
/* D-Trust cards (D-TRUST, D-SIGN) */
if (strstr(p15card->tokeninfo->label,"D-TRUST") != NULL
|| strstr(p15card->tokeninfo->label,"D-SIGN") != NULL) {
if (p15card->tokeninfo->label
&& (strstr(p15card->tokeninfo->label,"D-TRUST") != NULL
|| strstr(p15card->tokeninfo->label,"D-SIGN") != NULL)) {
/* D-TRUST Card 2.0 2cc (standard cards, which always add
* SHA1 prefix itself */