[Pcsclite-muscle] New version of pcsc-lite: 1.9.6

Ludovic Rousseau ludovic.rousseau at gmail.com
Thu May 12 06:20:01 PDT 2022


Le mer. 11 mai 2022 à 23:04, Axel Braun <axel.braun at gmx.de> a écrit :
> Hi Ludovic,

Hello,

> Am Mittwoch, 11. Mai 2022, 18:17:02 CEST schrieb Ludovic Rousseau:
>
> > I just released a new version of pcsc-lite 1.9.6.
>
> Irun into the following error:
>
> [   18s] libtool: link: (cd ".libs" && rm -f "libpcsclite.so" && ln -s
> "libpcsclite.so.1.0.0" "libpcsclite.so")
> [   18s] libtool: link: ( cd ".libs" && rm -f "libpcsclite.la" && ln -s "../
> libpcsclite.la" "libpcsclite.la" )
> [   18s] /usr/bin/bash ../libtool  --tag=CC   --mode=link gcc  -Wall -Wextra -
> Wno-unused-parameter -Werror -Wall -fno-common -O2 -Wall -D_FORTIFY_SOURCE=2 -
> fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-
> clash-protection -Werror=return-type -flto=auto -g  -flto=auto -o testpcsc
> testpcsc.o libpcsclite.la -lrt
> [   18s] libtool: link: gcc -Wall -Wextra -Wno-unused-parameter -Werror -Wall
> -fno-common -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-
> tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-
> type -flto=auto -g -flto=auto -o .libs/testpcsc testpcsc.o  ./.libs/
> libpcsclite.so -lrt -pthread -Wl,-rpath -Wl,/usr/lib64
> [   18s] pcscdaemon.c: In function 'main':
> [   18s] winscard_msg_srv.c:259:25: error: 'dwClientID' may be used
> uninitialized in this function [-Werror=maybe-uninitialized]
> [   18s]   259 |                         Log2(PCSC_LOG_ERROR,
> [   18s]       |                         ^
> [   18s] pcscdaemon.c:110:18: note: 'dwClientID' was declared here
> [   18s]   110 |         uint32_t dwClientID;    /* Connection ID used to
> reference the Client */
> [   18s]       |                  ^
> [   18s] lto1: all warnings being treated as errors
>
> With the option --disable-strict the error is gone.
>
> Is this what you recommend in that case?

Yes. The error should just be a warning and ignored.

Can apply this patch and try again:
diff --git a/src/pcscdaemon.c b/src/pcscdaemon.c
index e07ade4..35649c3 100644
--- a/src/pcscdaemon.c
+++ b/src/pcscdaemon.c
@@ -107,7 +107,7 @@ static void SVCServiceRunLoop(void)
 {
     int rsp;
     LONG rv;
-    uint32_t dwClientID;    /* Connection ID used to reference the Client */
+    uint32_t dwClientID = 0;    /* Connection ID used to reference
the Client */

     while (TRUE)
     {



The problem is detected at the link stage, not compilation.
It is nice to see progress in the static analysis of our tools.

What version of OS and gcc do you use?

Bye

-- 
 Dr. Ludovic Rousseau



More information about the pcsclite-muscle mailing list