[SmartcardServices-Changes] [110] trunk/Tokend/PKCS11/GemaltoToken.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Tue Feb 2 02:50:11 PST 2010
Revision: 110
http://trac.macosforge.org/projects/smartcardservices/changeset/110
Author: ludovic.rousseau at gmail.com
Date: 2010-02-02 02:50:08 -0800 (Tue, 02 Feb 2010)
Log Message:
-----------
GemaltoToken::probe(): correctly NUL-terminate the tokeninfo label
Modified Paths:
--------------
trunk/Tokend/PKCS11/GemaltoToken.cpp
Modified: trunk/Tokend/PKCS11/GemaltoToken.cpp
===================================================================
--- trunk/Tokend/PKCS11/GemaltoToken.cpp 2010-02-02 10:44:29 UTC (rev 109)
+++ trunk/Tokend/PKCS11/GemaltoToken.cpp 2010-02-02 10:50:08 UTC (rev 110)
@@ -390,7 +390,8 @@
score = 500;
// Setup the tokendUID
- char label[ sizeof(mCKTokenInfo.label) ];
+ char label[ sizeof(mCKTokenInfo.label)+1 ];
+ label[sizeof(mCKTokenInfo.label)] = '\0';
memcpy( label, mCKTokenInfo.label, sizeof(mCKTokenInfo.label) );
char* trimLabel = trim_line( label );
snprintf(tokenUid, TOKEND_MAX_UID, "Gemalto smartcard %s (%.*s)", trimLabel, (int) sizeof(mCKTokenInfo.serialNumber), mCKTokenInfo.serialNumber );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/smartcardservices-changes/attachments/20100202/035eb954/attachment-0001.html>
More information about the SmartcardServices-Changes
mailing list