[Pcsclite-cvs-commit] r1747 - trunk/Drivers/ccid/src

Ludovic Rousseau rousseau at costa.debian.org
Thu Nov 24 15:49:00 UTC 2005


Author: rousseau
Date: 2005-11-24 15:49:00 +0000 (Thu, 24 Nov 2005)
New Revision: 1747

Modified:
   trunk/Drivers/ccid/src/commands.c
Log:
SecurePINVerify()/SecurePINModify(): set the response length to 0 in
case of (write) communication error


Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c	2005-11-24 15:47:10 UTC (rev 1746)
+++ trunk/Drivers/ccid/src/commands.c	2005-11-24 15:49:00 UTC (rev 1747)
@@ -243,7 +243,10 @@
 	ccid_descriptor -> readTimeout = max(30, TxBuffer[0]);	/* at least 30 seconds */
 
 	if (WritePort(reader_index, a, cmd) != STATUS_SUCCESS)
+	{
+		*RxLength = 0;
 		return IFD_COMMUNICATION_ERROR;
+	}
 
 	ret = CCID_Receive(reader_index, RxLength, RxBuffer);
 
@@ -349,7 +352,10 @@
 	ccid_descriptor -> readTimeout = max(30, TxBuffer[0]);	/* at least 30 seconds */
 
 	if (WritePort(reader_index, a, cmd) != STATUS_SUCCESS)
+	{
+		*RxLength = 0;
  		return IFD_COMMUNICATION_ERROR;
+	}
 
  	ret = CCID_Receive(reader_index, RxLength, RxBuffer);
 




More information about the Pcsclite-cvs-commit mailing list