mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
cppchecker fixes
This commit is contained in:
parent
4d2f8a3bd5
commit
6eb02c5f8e
4 changed files with 7 additions and 7 deletions
|
@ -430,7 +430,7 @@ void *mifare_cryto_preprocess_data(desfiretag_t tag, void *data, size_t *nbytes,
|
|||
break;
|
||||
// Append MAC
|
||||
size_t bla = maced_data_length(DESFIRE(tag)->session_key, *nbytes - offset) + offset;
|
||||
bla++;
|
||||
(void)bla++;
|
||||
|
||||
memcpy(res + *nbytes, mac, 4);
|
||||
|
||||
|
@ -443,7 +443,7 @@ void *mifare_cryto_preprocess_data(desfiretag_t tag, void *data, size_t *nbytes,
|
|||
|
||||
if (append_mac) {
|
||||
size_t len = maced_data_length(key, *nbytes);
|
||||
++len;
|
||||
(void)++len;
|
||||
memcpy(res, data, *nbytes);
|
||||
memcpy(res + *nbytes, DESFIRE(tag)->cmac, CMAC_LENGTH);
|
||||
*nbytes += CMAC_LENGTH;
|
||||
|
|
|
@ -860,7 +860,7 @@ int do_iclass_simulation(int simulationMode, uint8_t *reader_mac_buf) {
|
|||
|
||||
} else if (cmd == ICLASS_CMD_DETECT) { // 0x0F
|
||||
// not supported yet, ignore
|
||||
} else if (cmd == 0x26 && len == 5) {
|
||||
// } else if (cmd == 0x26 && len == 5) {
|
||||
// standard ISO15693 INVENTORY command. Ignore.
|
||||
} else {
|
||||
// Never seen this command before
|
||||
|
@ -1021,7 +1021,7 @@ int do_iclass_simulation_nonsec(void) {
|
|||
|
||||
bool button_pressed = false;
|
||||
uint8_t cmd, options, block;
|
||||
int len = 0;
|
||||
int len;
|
||||
|
||||
bool exit_loop = false;
|
||||
while (exit_loop == false) {
|
||||
|
@ -1213,7 +1213,7 @@ int do_iclass_simulation_nonsec(void) {
|
|||
goto send;
|
||||
|
||||
// } else if(cmd == ICLASS_CMD_DETECT) { // 0x0F
|
||||
} else if (cmd == 0x26 && len == 5) {
|
||||
// } else if (cmd == 0x26 && len == 5) {
|
||||
// standard ISO15693 INVENTORY command. Ignore.
|
||||
} else {
|
||||
// Never seen this command before
|
||||
|
|
|
@ -2107,7 +2107,7 @@ void T55xx_ChkPwds(uint8_t flags) {
|
|||
|
||||
#endif
|
||||
|
||||
uint64_t curr = 0, prev = 0;
|
||||
uint64_t curr, prev = 0;
|
||||
int32_t idx = -1;
|
||||
|
||||
for (uint32_t i = 0; i < pwd_count; i++) {
|
||||
|
|
|
@ -271,7 +271,7 @@ void MifareDES_Auth1(uint8_t *datain) {
|
|||
memcpy(keybytes, PICC_MASTER_KEY8, 8);
|
||||
} else if (payload->algo == MFDES_ALGO_AES || payload->algo == MFDES_ALGO_3DES) {
|
||||
memcpy(keybytes, PICC_MASTER_KEY16, 16);
|
||||
} else if (payload->algo == MFDES_ALGO_3DES) {
|
||||
} else if (payload->algo == MFDES_ALGO_3K3DES) {
|
||||
memcpy(keybytes, PICC_MASTER_KEY24, 24);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue