Fix byte overwrite for long chained RAPDU.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2024-01-02 01:58:09 +01:00
parent b4f71beaf0
commit bbc06efe67
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -260,8 +260,8 @@ int driver_process_usb_packet_emul(uint8_t itf, uint16_t len) {
DEBUG_PAYLOAD(data, len);
if ((sent = apdu_process(itf, data, len)) > 0) {
process_apdu();
apdu_finish();
}
apdu_finish();
if (sent > 0) {
uint16_t ret = apdu_next();
DEBUG_PAYLOAD(apdu.rdata, ret);