From 038d5347fe2c80e319979f69923511d5a46956f7 Mon Sep 17 00:00:00 2001 From: Ludvig Michaelsson Date: Fri, 13 Sep 2024 13:40:38 +0200 Subject: [PATCH] nfc: chain rapdus in rx_init Some cards erroneously interpret Le=0 as requesting no response data. When this happens, they send a 61nn response instead. --- src/nfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nfc.c b/src/nfc.c index 5a552db4..bd2211ca 100644 --- a/src/nfc.c +++ b/src/nfc.c @@ -249,7 +249,7 @@ rx_init(fido_dev_t *d, unsigned char *buf, size_t count, int ms) memset(attr, 0, sizeof(*attr)); - if ((n = d->io.read(d->io_handle, f, sizeof(f), ms)) < 2 || + if ((n = rx_msg(d, f, sizeof(f), ms, false)) < 2 || (f[n - 2] << 8 | f[n - 1]) != SW_NO_ERROR) { fido_log_debug("%s: read", __func__); return -1;