mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-14 03:03:14 +08:00
FIX: This tries to fix the memalign issued on MAC OS X, which it doesn't have. However its standard Malloc is already 16byte memaligned.
ref: http://stackoverflow.com/questions/196329/osx-lacks-memalign
This commit is contained in:
parent
0fa87186cf
commit
9d590832a1
1 changed files with 6 additions and 3 deletions
|
@ -814,7 +814,6 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_
|
|||
//printf("Encrypted nonce: %08x, encrypted_parity: %02x\n", nt_enc2, par_enc & 0x0f);
|
||||
total_added_nonces += add_nonce(nt_enc2, par_enc & 0x0f);
|
||||
|
||||
|
||||
if (nonce_file_write) {
|
||||
fwrite(bufp, 1, 9, fnonces);
|
||||
}
|
||||
|
@ -1399,8 +1398,12 @@ static const uint64_t crack_states_bitsliced(statelist_t *p){
|
|||
#else
|
||||
bitslice_t * restrict lstate_p = _aligned_malloc((STATE_SIZE+ROLLBACK_SIZE) * bSize, bSize);
|
||||
#endif
|
||||
#else
|
||||
#ifdef defined(__APPLE__)
|
||||
bitslice_t * restrict lstate_p = malloc((STATE_SIZE+ROLLBACK_SIZE) * bSize);
|
||||
#else
|
||||
bitslice_t * restrict lstate_p = memalign(bSize, (STATE_SIZE+ROLLBACK_SIZE) * bSize);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if ( !lstate_p ) {
|
||||
|
@ -1744,8 +1747,8 @@ int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBloc
|
|||
|
||||
//Tests();
|
||||
|
||||
PrintAndLog("");
|
||||
PrintAndLog("Sum(a0) = %d", first_byte_Sum);
|
||||
//PrintAndLog("");
|
||||
//PrintAndLog("Sum(a0) = %d", first_byte_Sum);
|
||||
// PrintAndLog("Best 10 first bytes: %02x, %02x, %02x, %02x, %02x, %02x, %02x, %02x, %02x, %02x",
|
||||
// best_first_bytes[0],
|
||||
// best_first_bytes[1],
|
||||
|
|
Loading…
Reference in a new issue