[Pcsclite-git-commit] [CCID] 02/03: scardcontrol: initialize the bRecvBuffer buffer

Ludovic Rousseau rousseau at moszumanska.debian.org
Fri Jul 1 15:43:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository CCID.

commit 6fe851996a1ebd4691fa7bb427c42b456b6c2623
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Fri Jul 1 11:01:06 2016 +0200

    scardcontrol: initialize the bRecvBuffer buffer
    
    Fill the bRecvBuffer receiving buffer with the "magic" value 0xAA to
    detect what part of the buffer is filled by the reader.
---
 examples/scardcontrol.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/scardcontrol.c b/examples/scardcontrol.c
index 879695b..3d82bca 100644
--- a/examples/scardcontrol.c
+++ b/examples/scardcontrol.c
@@ -642,6 +642,7 @@ int main(int argc, char *argv[])
 	printf("\n");
 	printf("Enter your PIN: ");
 	fflush(stdout);
+	memset(bRecvBuffer, 0xAA, sizeof bRecvBuffer);
 	rv = SCardControl(hCard, verify_ioctl, bSendBuffer,
 		length, bRecvBuffer, sizeof(bRecvBuffer), &length);
 
@@ -787,6 +788,7 @@ int main(int argc, char *argv[])
 	printf("\n");
 	printf("Enter your PIN: ");
 	fflush(stdout);
+	memset(bRecvBuffer, 0xAA, sizeof bRecvBuffer);
 	rv = SCardControl(hCard, modify_ioctl, bSendBuffer,
 		length, bRecvBuffer, sizeof(bRecvBuffer), &length);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git



More information about the Pcsclite-cvs-commit mailing list