[Pcsclite-cvs-commit] r2899 - /trunk/PCSC/src/winscard_svc.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Apr 22 13:12:16 UTC 2008
Author: rousseau
Date: Tue Apr 22 13:12:15 2008
New Revision: 2899
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2899
Log:
ContextThread(): check the return value of MSGFunctionDemarshall() and
correctly exists in case of error. This happens when
MSGCheckHandleAssociation() fails
Thanks to Alon Bar-Lev for the bug report
Modified:
trunk/PCSC/src/winscard_svc.c
Modified: trunk/PCSC/src/winscard_svc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_svc.c?rev=2899&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_svc.c (original)
+++ trunk/PCSC/src/winscard_svc.c Tue Apr 22 13:12:15 2008
@@ -153,7 +153,15 @@
/*
* Command must be found
*/
- MSGFunctionDemarshall(&msgStruct, dwContextIndex);
+ rv = MSGFunctionDemarshall(&msgStruct, dwContextIndex);
+ if (rv)
+ {
+ Log2(PCSC_LOG_DEBUG, "MSGFunctionDemarshall failed: %d",
+ rv);
+ SYS_CloseFile(psContext[dwContextIndex].dwClientID);
+ MSGCleanupClient(dwContextIndex);
+ SYS_ThreadExit((LPVOID) NULL);
+ }
/* the SCARD_TRANSMIT_EXTENDED anwser is already sent by
* MSGFunctionDemarshall */
More information about the Pcsclite-cvs-commit
mailing list