mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-08-28 20:08:16 +00:00
fix coverity findings
This commit is contained in:
@@ -6347,12 +6347,17 @@ static void *brute_thread(void *args_void) {
|
||||
// prebit matcher.
|
||||
bool done = false;
|
||||
for (int w = 0; w < bs->words && !done; w++) {
|
||||
|
||||
uint64_t m = match[w];
|
||||
|
||||
while (m != 0) {
|
||||
|
||||
const int L = __builtin_ctzll(m);
|
||||
m &= m - 1;
|
||||
const uint64_t cand = index + (uint64_t)(w * 64 + L);
|
||||
|
||||
generate_key_block_inverted(args->startingKey, cand, div_key);
|
||||
|
||||
if (doMAC_brute_match_prebit(y_bits2, div_key, args->MAC_TAG2)) {
|
||||
legbrute_announce(args, div_key);
|
||||
done = true;
|
||||
|
||||
@@ -533,10 +533,12 @@ static int CmdHF14AJookiSim(const char *Cmd) {
|
||||
|
||||
// fast push mode
|
||||
g_conn.block_after_ACK = true;
|
||||
uint8_t blockwidth = 4, counter = 0, blockno = 0;
|
||||
uint8_t blockwidth = 4
|
||||
uint8_t counter = 0;
|
||||
uint8_t blockno = 0;
|
||||
|
||||
// 12 is the size of the struct the fct mf_eml_set_mem_xt uses to transfer to device
|
||||
uint16_t max_avail_blocks = ((PM3_CMD_DATA_SIZE - 12) / blockwidth) * blockwidth;
|
||||
uint16_t max_avail_blocks = ((PM3_CMD_DATA_SIZE - 12) / blockwidth);
|
||||
|
||||
while (datalen) {
|
||||
if (datalen == blockwidth) {
|
||||
|
||||
Reference in New Issue
Block a user