Hi!

I discovered some errors due to uninitialized parameters. This might
only concern opensc when used with pcsc-lite version 1.5.5, but it
doesn't hurt to set them anyway.

Cheers, Frank.
Index: src/libopensc/reader-pcsc.c
===================================================================
--- src/libopensc/reader-pcsc.c (Revision 4981)
+++ src/libopensc/reader-pcsc.c (Arbeitskopie)
@@ -391,7 +391,8 @@
 
 static int pcsc_reconnect(sc_reader_t * reader, DWORD action)
 {
-       DWORD active_proto, tmp, protocol = SCARD_PROTOCOL_T0 | 
SCARD_PROTOCOL_T1;
+       DWORD active_proto = opensc_proto_to_pcsc(reader->active_protocol),
+                 tmp, protocol = SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1;
        LONG rv;
        struct pcsc_private_data *priv = GET_PRIV_DATA(reader);
        int r;
@@ -841,7 +842,7 @@
 static int pcsc_detect_readers(sc_context_t *ctx)
 {
        struct pcsc_global_private_data *gpriv = (struct 
pcsc_global_private_data *) ctx->reader_drv_data;
-       DWORD active_proto, reader_buf_size;
+       DWORD active_proto, reader_buf_size = 0;
        SCARDHANDLE card_handle;
        LONG rv;
        char *reader_buf = NULL, *reader_name;

Attachment: pgpTWCvcCwutX.pgp
Description: PGP signature

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to