Skip to content

Commit

Permalink
nfc: chain rapdus in rx_init
Browse files Browse the repository at this point in the history
Some cards erroneously interpret Le=0 as requesting no response data.
When this happens, they send a 61nn response instead.
  • Loading branch information
LDVG committed Sep 13, 2024
1 parent ebc2d87 commit bf91cd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, buf, sizeof(f), ms, false)) < 2 ||
(f[n - 2] << 8 | f[n - 1]) != SW_NO_ERROR) {
fido_log_debug("%s: read", __func__);
return -1;
Expand Down

0 comments on commit bf91cd6

Please sign in to comment.