Index: src/mifare.c
===================================================================
--- src/mifare.c (revision 1071)
+++ src/mifare.c (working copy)
@@ -104,7 +104,8 @@
}
// Fire the mifare command
int res;
- if ((res = nfc_initiator_transceive_bytes(pnd, abtCmd, 2 + szParamLen, abtRx, sizeof(abtRx), -1)) < 0) {
+ size_t abtRxSize = sizeof(abtRx);
+ if ((res = nfc_initiator_transceive_bytes(pnd, abtCmd, 2 + szParamLen, abtRx, &abtRxSize, -1)) < 0) {
if (res == NFC_ERFTRANS) {
// "Invalid received frame", usual means we are
// authenticated on a sector but the requested MIFARE cmd (read, write)
Index: src/mfoc.c
===================================================================
--- src/mfoc.c (revision 1071)
+++ src/mfoc.c (working copy)
@@ -690,7 +690,8 @@
exit (EXIT_FAILURE);
}
- if (nfc_initiator_transceive_bytes(r.pdi, Auth, 4, Rx, sizeof(Rx), 0) < 0) {
+ RxLen = sizeof(Rx);
+ if (nfc_initiator_transceive_bytes(r.pdi, Auth, 4, Rx, &RxLen, 0) < 0) {
fprintf(stdout, "Error while requesting plain tag-nonce\n");
exit(EXIT_FAILURE);
}