<div dir="ltr">Hi. <br>Valgrind detected usage of uninitialized memory in SCardConnect:<br><br>==19635== Memcheck, a memory error detector<br>==19635== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.<br>==19635== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info<br>==19635== Command: /usr/rtests/bin/Pkcs11UnitTest.X64 pkcs11_common<br>==19635== <br>Running pkcs11_common<br>pkcs11_common::testGetInfo==19635== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)<br>==19635== at 0x605A1F7: send (send.c:32)<br>==19635== by 0xBC47CE6: ??? (in /lib/x86_64-linux-gnu/libpcsclite.so.1.0.0)<br>==19635== by 0xBC47E22: ??? (in /lib/x86_64-linux-gnu/libpcsclite.so.1.0.0)<br>==19635== by 0xBC43BBE: SCardConnect (in /lib/x86_64-linux-gnu/libpcsclite.so.1.0.0)<br>...<br><br>connect_struct.szReader involved. Patch for resolving the problem:<br>root@test-x64-ub13:/tmp# diff -u pcsc-lite-1.8.16/src/winscard_clnt.c{,.patched}<br>--- pcsc-lite-1.8.16/src/winscard_clnt.c 2016-03-12 23:03:09.000000000 +0400<br>+++ pcsc-lite-1.8.16/src/winscard_clnt.c.patched 2016-04-07 16:20:28.193294111 +0400<br>@@ -764,7 +764,7 @@<br> LPDWORD pdwActiveProtocol)<br> {<br> LONG rv;<br>- struct connect_struct scConnectStruct;<br>+ struct connect_struct scConnectStruct = { 0 };<br> SCONTEXTMAP * currentContextMap;<br><br> PROFILE_START<br></div>