Skip to content

Commit

Permalink
TRDecodeAtr(): check for TA2 (specific mode) even if TD2 is not present
Browse files Browse the repository at this point in the history
"3F 80 10 01" was not parsed correctly for example and T=0 was used
instead of T=1 (specific mode)

Same patch as revision 4615 in upstream pcsc-lite
http://svn.debian.org/viewsvn/pcsclite?view=rev&revision=4615

git-svn-id: https://svn.macosforge.org/repository/smartcardservices/trunk@98 6beaa694-74da-4ea8-86b6-2f242058810b
  • Loading branch information
Ludovic Rousseau committed Jan 11, 2010
1 parent a678759 commit 0cbade3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SmartCardServices/src/PCSC/atrhandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ short ATRDecodeAtr(PSMARTCARD_EXTENSION psExtension,
* supported at this time
*/
}
} else
Y1i = 0;

/* test presence of TA2 */
if ((2 == i) && (TAi >= 0))
Expand All @@ -222,8 +224,6 @@ short ATRDecodeAtr(PSMARTCARD_EXTENSION psExtension,
return 0; /** @retval 0 Unable do decode T protocol */
}
}
} else
Y1i = 0;

if (p > MAX_ATR_SIZE)
{
Expand Down

0 comments on commit 0cbade3

Please sign in to comment.