From 88b2978ae5cf3f1de95ebaec0aec0acd3a24878e Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Thu, 22 Dec 2022 22:50:37 +0100 Subject: [PATCH] Fix ATR response. Signed-off-by: Pol Henarejos --- src/usb/ccid/ccid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usb/ccid/ccid.c b/src/usb/ccid/ccid.c index 5eb8073..eac8f77 100644 --- a/src/usb/ccid/ccid.c +++ b/src/usb/ccid/ccid.c @@ -178,7 +178,7 @@ int driver_process_usb_packet_ccid(uint16_t rx_read) { ccid_response->abRFU0 = 0; ccid_response->abRFU1 = 0; //printf("1 %x %x %x || %x %x %x\r\n",ccid_response->apdu,apdu.rdata,ccid_response,ccid_header,ccid_header->apdu,apdu.data); - memcpy(apdu.rdata, ccid_atr+1, size_atr); + memcpy(&ccid_response->apdu, ccid_atr+1, size_atr); card_start(apdu_thread); ccid_status = 0; ccid_write(size_atr);