Package: libpcsclite-dev Severity: normal Tags: patch Hi,
I saw Kuro-box Pro (arm arch) users claims that when they use program to decode B25 data that build with libpcsclite-dev, it occurs "winscard_svc.c:565:MSGCheckHandleAssociation() Client failed to authenticate" error. With PCSC-Lite, "transmit_struct_extended" structure is defined as below ---------------------------------------------------------------------------- struct transmit_struct_extended { int32_t hCard; uint32_t pioSendPciProtocol; uint32_t pioSendPciLength; uint32_t cbSendLength; uint32_t pioRecvPciProtocol; uint32_t pioRecvPciLength; uint32_t pcbRecvLength; uint32_t rv; uint64_t size; uint8_t data[1]; }; typedef struct transmit_struct_extended transmit_struct_extended; ---------------------------------------------------------------------------- and in src/winscard_clnt.c, SCardTransmit() function is ---------------------------------------------------------------------------- 2894 unsigned char buffer[sizeof(sharedSegmentMsg) + MAX_BUFFER_SIZE_EXTENDED]; 2895 transmit_struct_extended *scTransmitStructExtended = (transmit_struct_extended *)buffer; 2896 sharedSegmentMsg *pmsgStruct = (psharedSegmentMsg)buffer; 2897 2898 scTransmitStructExtended->hCard = hCard; 2899 scTransmitStructExtended->cbSendLength = cbSendLength; ---------------------------------------------------------------------------- hCard in line 2898 will be changed when 2899 called, they say. And some of them pointed out what they need is to set "CFLAGS = -fno-strict-aliasing" for workaround. I don't have any (configurable ;) arm box, so I'm sure attached patch works or not. But, anyway, could you check it please? -- Regards, Hideki Yamane henrich @ debian.or.jp/iijmio-mail.jp http://wiki.debian.org/HidekiYamane
--- debian.orig/rules 2008-10-21 11:48:36.000000000 +0900 +++ debian/rules 2008-10-21 11:52:12.000000000 +0900 @@ -16,7 +16,7 @@ endif # see http://www.debian.org/doc/debian-policy/ch-files.html -CFLAGS += -Wall -D_REENTRANT +CFLAGS += -Wall -D_REENTRANT -fno-strict-aliasing INSTALL = install INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755