[#313651] Do not call get_data_rates() if bNumDataRatesSupported is 0

View Trackers | Feature Requests | Download .csv | Monitor

Date:
2012-05-23 07:21
Priority:
3
State:
Open
Submitted by:
Ludovic Rousseau (rousseau)
Assigned to:
Ludovic Rousseau (rousseau)
Category:
ccid
Group:
None
Summary:
Do not call get_data_rates() if bNumDataRatesSupported is 0

Detailed description
See http://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20120521/000006.html

Hi, I have a reader that does not return any data rates and sends a
bNumDataRatesSupported = 0 in it's descriptor. But the reader is being
rejected by pcsclite and I guess it's because when it asks for the
data rates it gets bad values. As far as I can tell the reader does
not answer the 0x03 control message.

My suggestion is to change ccid_usb.c in libccid, around line 558 from:

usbDevice[reader_index].ccid.arrayOfSupportedDataRates =
get_data_rates(reader_index, config_desc, num);

to:

if(usbDevice[reader_index].ccid.bNumDataRatesSupported)
usbDevice[reader_index].ccid.arrayOfSupportedDataRates =
get_data_rates(reader_index, config_desc, num);

This is the part of the log that shows this problem:
00000172 ccid_usb.c:508:OpenUSBByName() Using USB bus/device: 2/5
02021292 ccid_usb.c:1026:ControlUSB() control failed (2/5): -7 Success
00000042 ccid_usb.c:964:get_data_rates() Wrong GET DATA RATES size: 251

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge
Show source