[Pcsclite-cvs-commit] r3062 - /trunk/PCSC/src/winscard_clnt.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Jul 29 08:14:41 UTC 2008
Author: rousseau
Date: Tue Jul 29 08:14:41 2008
New Revision: 3062
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3062
Log:
SCardStatus(): set *pdwState and *pdwProtocol to 0 before
checking pcchReaderLen and pcbAtrLen
Should avoid the use of SUN libregression.c for some buggy applications
Modified:
trunk/PCSC/src/winscard_clnt.c
Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=3062&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Tue Jul 29 08:14:41 2008
@@ -1505,23 +1505,20 @@
PROFILE_START
- /*
- * Check for NULL parameters
- */
-
+ /* default output values */
+ if (pdwState)
+ *pdwState = 0;
+
+ if (pdwProtocol)
+ *pdwProtocol = 0;
+
+ /* Check for NULL parameters */
if (pcchReaderLen == NULL || pcbAtrLen == NULL)
return SCARD_E_INVALID_PARAMETER;
/* length passed from caller */
dwReaderLen = *pcchReaderLen;
dwAtrLen = *pcbAtrLen;
-
- /* default output values */
- if (pdwState)
- *pdwState = 0;
-
- if (pdwProtocol)
- *pdwProtocol = 0;
*pcchReaderLen = 0;
*pcbAtrLen = 0;
More information about the Pcsclite-cvs-commit
mailing list