don't trust AI suggested fixes blindly

This commit is contained in:
iceman1001
2026-03-28 18:10:32 +07:00
parent bc1b560add
commit 3bcaba6964
+8 -3
View File
@@ -95,9 +95,13 @@ uint16_t mifare_sendcmd(uint8_t cmd, uint8_t *data, uint8_t data_size, uint8_t *
if (data_size > 0) {
memcpy(dcmd + 1, data, data_size);
}
data_size ++;
AddCrc14A(dcmd, data_size + 1);
ReaderTransmit(dcmd, sizeof(dcmd), timing);
AddCrc14A(dcmd, data_size);
data_size += 2;
ReaderTransmit(dcmd, data_size, timing);
if (tearoff_hook() == PM3_ETEAROFF) { // tearoff occurred
return 0;
}
@@ -374,8 +378,9 @@ int mifare_ul_ev1_auth(uint8_t *keybytes, uint8_t *pack) {
uint8_t key[4] = {0x00, 0x00, 0x00, 0x00};
memcpy(key, keybytes, 4);
if (g_dbglevel >= DBG_EXTENDED)
if (g_dbglevel >= DBG_EXTENDED) {
Dbprintf("EV1 Auth : %02x%02x%02x%02x", key[0], key[1], key[2], key[3]);
}
len = mifare_sendcmd(MIFARE_ULEV1_AUTH, key, sizeof(key), resp, sizeof(resp), respPar, NULL);