1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

scd: Bug fix for a device with multiple interfaces.

* scd/ccid-driver.c (scan_or_find_usb_device): Use IFC_NO when
accessing interface information.

--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2016-03-07 20:12:38 +09:00
parent e997552161
commit 7a32f87ccc

View File

@ -1155,9 +1155,10 @@ scan_or_find_usb_device (int scan_mode,
for (ifc_no=0; ifc_no < config->bNumInterfaces; ifc_no++)
{
for (set_no=0; set_no < config->interface->num_altsetting; set_no++)
for (set_no=0; set_no < config->interface[ifc_no].num_altsetting;
set_no++)
{
ifcdesc = (config->interface->altsetting + set_no);
ifcdesc = (config->interface[ifc_no].altsetting + set_no);
/* The second condition is for older SCM SPR 532 who did
not know about the assigned CCID class. The third
condition does the same for a Cherry SmartTerminal