--- src/mifare.c.orig 2013-12-06 15:29:07.000000000 +0100
+++ src/mifare.c 2014-10-03 11:00:06.575404505 +0200
@@ -124,7 +124,8 @@
return res;
}
// Fire the mifare command
- 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) {
return res;
}
--- src/mfoc.c.orig 2013-12-06 15:29:07.000000000 +0100
+++ src/mfoc.c 2014-10-03 10:59:23.001537603 +0200
@@ -706,6 +706,7 @@
uint8_t Rx[MAX_FRAME_LEN]; // Tag response
uint8_t RxPar[MAX_FRAME_LEN]; // Tag response
+ size_t RxLen;
uint32_t Nt, NtLast, NtProbe, NtEnc, Ks1;
@@ -731,7 +732,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);
}