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

Ludovic Rousseau rousseau at costa.debian.org
Thu Nov 24 15:47:10 UTC 2005


Author: rousseau
Date: 2005-11-24 15:47:10 +0000 (Thu, 24 Nov 2005)
New Revision: 1746

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


Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c	2005-11-24 15:46:21 UTC (rev 1745)
+++ trunk/Drivers/ccid/src/commands.c	2005-11-24 15:47:10 UTC (rev 1746)
@@ -280,11 +280,17 @@
 	if ((TxLength > 19+CMD_BUF_SIZE) /* command too large? */
 		|| (TxLength < 18+4 /* 4 = APDU size */) /* command too short? */
 		|| (TxBuffer[20] + 24 != TxLength)) /* ulDataLength field coherency */
+	{
+		*RxLength = 0;
 		return IFD_NOT_SUPPORTED;
+	}
 
 	/* Make sure in the beginning if bNumberMessage is valid or not */
 	if (TxBuffer[11] > 3)
+	{
+		*RxLength = 0;
 		return IFD_NOT_SUPPORTED;
+	}
 
 	/* Build a CCID block from a PC/SC V2.1.2 Part 10 block */
 




More information about the Pcsclite-cvs-commit mailing list