mifare_sendcmd_short: increase parity bits buffer as it's also used for reception

This commit is contained in:
Philippe Teuwen 2025-06-16 00:04:34 +02:00
commit eb5aa9e08e

View file

@ -100,7 +100,7 @@ uint16_t mifare_sendcmd_short(struct Crypto1State *pcs, uint8_t crypted, uint8_t
uint16_t pos; uint16_t pos;
uint8_t dcmd[4] = {cmd, data, 0x00, 0x00}; uint8_t dcmd[4] = {cmd, data, 0x00, 0x00};
uint8_t ecmd[4] = {0x00, 0x00, 0x00, 0x00}; uint8_t ecmd[4] = {0x00, 0x00, 0x00, 0x00};
uint8_t par[1] = {0x00}; // 1 Byte parity is enough here uint8_t par[MAX_MIFARE_PARITY_SIZE] = {0x00}; // used for cmd and answer
AddCrc14A(dcmd, 2); AddCrc14A(dcmd, 2);
memcpy(ecmd, dcmd, sizeof(dcmd)); memcpy(ecmd, dcmd, sizeof(dcmd));