mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
cppchecker fixes
This commit is contained in:
parent
9a00ad0230
commit
51fb73f4c8
1 changed files with 5 additions and 4 deletions
|
@ -1924,6 +1924,7 @@ static int handler_desfire_readdata(mfdes_data_t *data, MFDES_FILE_TYPE_T type,
|
||||||
|
|
||||||
size_t plen = 8;
|
size_t plen = 8;
|
||||||
uint8_t *p = mifare_cryto_preprocess_data(tag, tmp_data, &plen, 0, MDCM_PLAIN | CMAC_COMMAND);
|
uint8_t *p = mifare_cryto_preprocess_data(tag, tmp_data, &plen, 0, MDCM_PLAIN | CMAC_COMMAND);
|
||||||
|
(void)p;
|
||||||
// apdu data does not need the cmd, so use the original read command data.
|
// apdu data does not need the cmd, so use the original read command data.
|
||||||
apdu.Lc = 7;
|
apdu.Lc = 7;
|
||||||
apdu.data = (uint8_t *)data;
|
apdu.data = (uint8_t *)data;
|
||||||
|
@ -1980,12 +1981,12 @@ static int handler_desfire_writedata(mfdes_data_t *data, MFDES_FILE_TYPE_T type,
|
||||||
90 3d 00 00 09 02 00 00 00 02 00 00 00 00 00
|
90 3d 00 00 09 02 00 00 00 02 00 00 00 00 00
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (data->fileno > 0x1F) return PM3_EINVARG;
|
if (data->fileno > 0x1F) {
|
||||||
|
return PM3_EINVARG;
|
||||||
|
}
|
||||||
uint32_t datatowrite = le24toh(data->length);
|
uint32_t datatowrite = le24toh(data->length);
|
||||||
uint32_t offset = le24toh(data->offset);
|
uint32_t offset = le24toh(data->offset);
|
||||||
uint32_t datasize;
|
uint32_t datasize, pos, recvlen = 0;
|
||||||
uint32_t pos = 0;
|
|
||||||
uint32_t recvlen = 0;
|
|
||||||
int res = PM3_SUCCESS;
|
int res = PM3_SUCCESS;
|
||||||
uint16_t sw = 0;
|
uint16_t sw = 0;
|
||||||
uint8_t tmp[60] = {0};
|
uint8_t tmp[60] = {0};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue