[Pcsclite-cvs-commit] Drivers/ccid/src/openct proto-t1.c,1.14,1.15

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/Drivers/ccid/src/openct
In directory haydn:/tmp/cvs-serv2504/openct

Modified Files:
	proto-t1.c 
Log Message:
t1_negociate_ifsd: the frame size is 5 only for LRC checksum. The
correct size is (4 + t1->rc_bytes)


Index: proto-t1.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/openct/proto-t1.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- proto-t1.c	27 Jul 2004 06:42:57 -0000	1.14
+++ proto-t1.c	24 Aug 2004 07:32:27 -0000	1.15
@@ -724,7 +724,8 @@
 			|| (sdata[DATA] != ifsd)				/* Wrong ifsd received */
 			|| (sdata[NAD] != swap_nibbles(dad))	/* wrong NAD */
 			|| (!t1_verify_checksum(t1, sdata, n))	/* checksum failed */
-			|| ((n != 5) || (sdata[LEN] != 1))		/* wrong length */
+			|| (n != 4 + t1->rc_bytes)				/* wrong frame length */
+			|| (sdata[LEN] != 1)					/* wrong data length */
 			|| (sdata[PCB] != (T1_S_BLOCK | T1_S_RESPONSE | T1_S_IFS))) /* wrong PCB */
 			continue;