I made a PR to fix this: https://dev.gnupg.org/D547.
Best, Anze On Thu, Dec 30, 2021 at 3:52 PM Werner Koch <w...@gnupg.org> wrote: > > I have attached logs of the wrong and correct behavior I observed > > (debug-level guru, debug-all). > > Yes, this is an obvious bug. We have not yet seen it because on Unix we > prefer to use the CCID driver using a different code path and further > with 2.3 there is not much need to specify a port. > > Here is the bug: > > while (dl->idx < dl->idx_max) > { > const char *rdrname = pcsc.rdrname[dl->idx]; > > if (DBG_READER) > log_debug ("apdu_open_reader: %s\n", rdrname); > > /* Check the identity of reader against already opened one. */ > for (slot = 0; slot < MAX_READER; slot++) > if (reader_table[slot].used > && !strcmp (reader_table[slot].rdrname, rdrname)) > break; > > if (slot == MAX_READER) > { /* Found a new device. */ > if (DBG_READER) > log_debug ("apdu_open_reader: new device=%s\n", rdrname); > > /* When reader string is specified, check if it is the one. > */ > if (readerno < 0 > && strncmp (rdrname, dl->portstr, strlen (dl->portstr)) > != 0) > continue; > > The /continue/ causes the loop because the loop index is not bumped. > > > Salam-Shalom, > > Werner > > -- > Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. >
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users