Permalink
Browse files

TRDecodeAtr(): check for TA2 (specific mode) even if TD2 is not present

"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...
1 parent a678759 commit 0cbade366ba5371e96bea9dee2ca87185f1a269f Ludovic Rousseau committed Jan 11, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 SmartCardServices/src/PCSC/atrhandler.c
@@ -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))
@@ -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)
{

0 comments on commit 0cbade3

Please sign in to comment.