trying to please codeQL

This commit is contained in:
Philippe Teuwen 2024-09-03 23:00:50 +02:00
parent e6c427fe21
commit 17ddc2db82
2 changed files with 5 additions and 5 deletions

View file

@ -1111,7 +1111,7 @@ void MifareAcquireStaticEncryptedNonces(uint32_t flags, uint8_t *key) {
};
if (with_data) {
uint8_t data[16];
for (uint8_t tb = blockNo; tb < blockNo + 4; tb++) {
for (uint16_t tb = blockNo; tb < blockNo + 4; tb++) {
memset(data, 0x00, sizeof(data));
int res = mifare_classic_readblock(pcs, tb, data);
if (res == 1) {

View file

@ -9858,15 +9858,15 @@ static int CmdHF14AMfISEN(const char *Cmd) {
PrintAndLogEx(NORMAL, "[\n [");
for (uint8_t sec = 0; sec < num_sectors; sec++) {
PrintAndLogEx(NORMAL, " [\"%08x\", \"%08x\"]%s",
bytes_to_num(resp.data.asBytes + ((sec * 2) * 9), 4),
bytes_to_num(resp.data.asBytes + (((sec * 2) + 1) * 9), 4),
(uint32_t) bytes_to_num(resp.data.asBytes + ((sec * 2) * 9), 4),
(uint32_t) bytes_to_num(resp.data.asBytes + (((sec * 2) + 1) * 9), 4),
sec < num_sectors - 1 ? "," : "");
}
PrintAndLogEx(NORMAL, " ],\n [");
for (uint8_t sec = 0; sec < num_sectors; sec++) {
PrintAndLogEx(NORMAL, " [\"%08x\", \"%08x\"]%s",
bytes_to_num(resp.data.asBytes + ((sec * 2) * 9) + 4, 4),
bytes_to_num(resp.data.asBytes + (((sec * 2) + 1) * 9) + 4, 4),
(uint32_t) bytes_to_num(resp.data.asBytes + ((sec * 2) * 9) + 4, 4),
(uint32_t) bytes_to_num(resp.data.asBytes + (((sec * 2) + 1) * 9) + 4, 4),
sec < num_sectors - 1 ? "," : "");
}
PrintAndLogEx(NORMAL, " ],\n [");