[Pcsclite-cvs-commit] CVS Drivers/ccid/src
CVS User rousseau
ludovic.rousseau@free.fr
Wed, 08 Sep 2004 14:45:20 -0600
Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory haydn:/tmp/cvs-serv6966
Modified Files:
commands.c
Log Message:
CmdPowerOn(): do not use a null terminated C string for the EMV->ISO
switch command since the command is NOT a C string
--- /cvsroot/pcsclite/Drivers/ccid/src/commands.c 2004/09/08 20:41:24 1.30
+++ /cvsroot/pcsclite/Drivers/ccid/src/commands.c 2004/09/08 20:45:19 1.31
@@ -18,7 +18,7 @@
*/
/*
- * $Id: commands.c,v 1.30 2004/09/08 20:41:24 rousseau Exp $
+ * $Id: commands.c,v 1.31 2004/09/08 20:45:19 rousseau Exp $
*/
#include <string.h>
@@ -110,11 +110,11 @@
((GEMPC433 == ccid_descriptor->readerID)
|| (CHERRYXX33 == ccid_descriptor->readerID)))
{
- unsigned char cmd[] = "\x1F\x01";
+ unsigned char cmd[] = {0x1F, 0x01};
unsigned char res[1];
unsigned int res_length = sizeof(res);
- if ((return_value = CmdEscape(reader_index, cmd, sizeof(cmd)-1, res,
+ if ((return_value = CmdEscape(reader_index, cmd, sizeof(cmd), res,
&res_length)) != IFD_SUCCESS)
return return_value;