[Pcsclite-cvs-commit] r2046 - trunk/Drivers/ccid/src/openct

Ludovic Rousseau rousseau at costa.debian.org
Fri May 19 11:56:32 UTC 2006


Author: rousseau
Date: 2006-05-19 11:56:18 +0000 (Fri, 19 May 2006)
New Revision: 2046

Modified:
   trunk/Drivers/ccid/src/openct/proto-t1.c
Log:
t1_transceive(): add a overrun debug message if we received more bytes
than we can store.


Modified: trunk/Drivers/ccid/src/openct/proto-t1.c
===================================================================
--- trunk/Drivers/ccid/src/openct/proto-t1.c	2006-05-19 11:53:54 UTC (rev 2045)
+++ trunk/Drivers/ccid/src/openct/proto-t1.c	2006-05-19 11:56:18 UTC (rev 2046)
@@ -377,7 +377,10 @@
 			t1->nr ^= 1;
 
 			if (ct_buf_put(&rbuf, sdata + 3, sdata[LEN]) < 0)
+			{
+				DEBUG_CRITICAL2("buffer overrun by %d bytes", sdata[LEN] - (rbuf.size - rbuf.tail));
 				goto error;
+			}
 
 			if ((pcb & T1_MORE_BLOCKS) == 0)
 				goto done;




More information about the Pcsclite-cvs-commit mailing list