[Pcsclite-cvs-commit] CVS PCSC/src
CVS User rousseau
ludovic.rousseau@free.fr
Mon, 28 Feb 2005 08:08:19 -0700
Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv10675
Modified Files:
winscard.c
Log Message:
SCardControl(): rContext was used before initialisation (segmentation
fault)
--- /cvsroot/pcsclite/PCSC/src/winscard.c 2005/02/24 12:53:00 1.49
+++ /cvsroot/pcsclite/PCSC/src/winscard.c 2005/02/28 15:08:19 1.50
@@ -8,7 +8,7 @@
* David Corcoran <corcoran@linuxnet.com>
* Ludovic Rousseau <ludovic.rousseau@free.fr>
*
- * $Id: winscard.c,v 1.49 2005/02/24 12:53:00 rousseau Exp $
+ * $Id: winscard.c,v 1.50 2005/02/28 15:08:19 rousseau Exp $
*/
#include "config.h"
@@ -1112,10 +1112,6 @@
if (0 == hCard)
return SCARD_E_INVALID_HANDLE;
- if (IFD_HVERSION_2_0 == rContext->dwVersion)
- if (NULL == pbSendBuffer || 0 == cbSendLength)
- return SCARD_E_INVALID_PARAMETER;
-
/*
* Make sure no one has a lock on this reader
*/
@@ -1126,6 +1122,10 @@
if (rv != SCARD_S_SUCCESS)
return rv;
+ if (IFD_HVERSION_2_0 == rContext->dwVersion)
+ if (NULL == pbSendBuffer || 0 == cbSendLength)
+ return SCARD_E_INVALID_PARAMETER;
+
/*
* Make sure the reader is working properly
*/