This commit is contained in:
iceman1001 2017-09-26 17:02:18 +02:00
commit f054f5da32
3 changed files with 4 additions and 4 deletions

View file

@ -794,7 +794,7 @@ int EM4x50Read(const char *Cmd, bool verbose) {
char tmp2[20];
int phaseoff;
high = low = 0;
memset(tmpbuff, 0, MAX_GRAPH_TRACE_LEN / 64);
memset(tmpbuff, 0, sizeof(tmpbuff) );
// get user entry if any
sscanf(Cmd, "%i %i", &clk, &invert);

View file

@ -342,7 +342,7 @@ const uint64_t CRACK_STATES_BITSLICED(uint32_t cuid, uint8_t *best_first_bytes,
// }
#endif
// add the even state bits
const bitslice_t const *restrict bitsliced_even_state = bitsliced_even_states[block_idx];
const bitslice_t *restrict bitsliced_even_state = bitsliced_even_states[block_idx];
for(uint32_t state_idx = 1; state_idx < STATE_SIZE; state_idx += 2) {
state_p[state_idx] = bitsliced_even_state[state_idx/2];
}

View file

@ -114,9 +114,9 @@ uint8_t _select(bool x, bool y, uint8_t r)
bool r6 = r >> 1 & 0x1;
bool r7 = r & 0x1;
bool z0 = (r0 & r2) ^ (r1 & ~r3) ^ (r2 | r4);
bool z0 = (r0 & r2) ^ (r1 & !r3) ^ (r2 | r4);
bool z1 = (r0 | r2) ^ ( r5 | r7) ^ r1 ^ r6 ^ x ^ y;
bool z2 = (r3 & ~r5) ^ (r4 & r6 ) ^ r7 ^ x;
bool z2 = (r3 & !r5) ^ (r4 & r6 ) ^ r7 ^ x;
// The three bitz z0.. z1 are packed into a uint8_t:
// 00000ZZZ