[Pcsclite-cvs-commit] r5844 - /trunk/PCSC/src/winscard_clnt.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Wed Jul 6 12:14:32 UTC 2011


Author: rousseau
Date: Wed Jul  6 12:14:31 2011
New Revision: 5844

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5844
Log:
SCardConnect(): use sizeof instead of a hardcoded value

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=5844&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Wed Jul  6 12:14:31 2011
@@ -895,7 +895,7 @@
 		 * -> so the mMutex has been unlocked */
 		return SCARD_E_INVALID_HANDLE;
 
-	strncpy(scConnectStruct.szReader, szReader, MAX_READERNAME);
+	strncpy(scConnectStruct.szReader, szReader, sizeof scConnectStruct.szReader);
 
 	scConnectStruct.hContext = hContext;
 	scConnectStruct.dwShareMode = dwShareMode;




More information about the Pcsclite-cvs-commit mailing list