coolkey: Accept only SW=90 00 as success to prevent interpretting invalid values

This commit is contained in:
Jakub Jelen 2019-11-11 13:41:50 +01:00 committed by Frank Morgner
parent ef3e223917
commit c173563ad2
1 changed files with 1 additions and 1 deletions

View File

@ -897,7 +897,7 @@ static int coolkey_check_sw(sc_card_t *card, unsigned int sw1, unsigned int sw2)
sc_log(card->ctx,
"sw1 = 0x%02x, sw2 = 0x%02x\n", sw1, sw2);
if (sw1 == 0x90)
if (sw1 == 0x90 && sw2 == 0x00)
return SC_SUCCESS;
if (sw1 == 0x9c) {