[Pcsclite-cvs-commit] r6841 - trunk/PCSC/src

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Tue Feb 11 09:45:54 UTC 2014


Author: rousseau
Date: 2014-02-11 09:45:54 +0000 (Tue, 11 Feb 2014)
New Revision: 6841

Modified:
   trunk/PCSC/src/winscard_svc.c
Log:
SCARD_CONNECT: force a NUL byte to terminate the reader name

The client part may send us anything. So we must enfore the reader name
is a NUL-byte terminated C-string.

Thanks to Nikos Mavrogiannopoulos for the patch


Modified: trunk/PCSC/src/winscard_svc.c
===================================================================
--- trunk/PCSC/src/winscard_svc.c	2014-02-08 16:51:42 UTC (rev 6840)
+++ trunk/PCSC/src/winscard_svc.c	2014-02-11 09:45:54 UTC (rev 6841)
@@ -462,6 +462,7 @@
 
 				READ_BODY(coStr)
 
+				coStr.szReader[sizeof(coStr.szReader)-1] = 0;
 				hCard = coStr.hCard;
 				dwActiveProtocol = coStr.dwActiveProtocol;
 




More information about the Pcsclite-cvs-commit mailing list