Revision
98
Author
ludovic.rousseau@gmail.com
Date
2010-01-11 05:55:58 -0800 (Mon, 11 Jan 2010)

Log Message

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

Modified Paths

Diff

Modified: trunk/SmartCardServices/src/PCSC/atrhandler.c (97 => 98)


--- trunk/SmartCardServices/src/PCSC/atrhandler.c	2010-01-11 13:43:23 UTC (rev 97)
+++ trunk/SmartCardServices/src/PCSC/atrhandler.c	2010-01-11 13:55:58 UTC (rev 98)
@@ -196,6 +196,8 @@
 						 * supported at this time
 						 */
 					}
+		} else
+			Y1i = 0;
 
 			/* test presence of TA2 */
 			if ((2 == i) && (TAi >= 0))
@@ -222,8 +224,6 @@
 						return 0; /** @retval 0 Unable do decode T protocol */
 				}
 			}
-		} else
-			Y1i = 0;
 
 		if (p > MAX_ATR_SIZE)
 		{