Merge pull request #549 from frankmorgner/547

fixed bad string comparison
This commit is contained in:
Frank Morgner 2015-09-11 12:47:04 +02:00
commit 5944915e0e
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 */