mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
lto missing inits
This commit is contained in:
parent
602daa7fdd
commit
2b3d339714
3 changed files with 4 additions and 4 deletions
|
@ -663,7 +663,7 @@ static int CmdIndalaSim(const char *Cmd) {
|
||||||
bool fmt4041x = arg_get_lit(ctx, 5);
|
bool fmt4041x = arg_get_lit(ctx, 5);
|
||||||
|
|
||||||
|
|
||||||
int32_t cardnumber;
|
int32_t cardnumber = 0;
|
||||||
uint8_t fc = 0;
|
uint8_t fc = 0;
|
||||||
uint16_t cn = 0;
|
uint16_t cn = 0;
|
||||||
bool got_cn = false, got_26 = false;
|
bool got_cn = false, got_26 = false;
|
||||||
|
|
|
@ -156,7 +156,7 @@ static void SendCommandNG_internal(uint16_t cmd, uint8_t *data, size_t len, bool
|
||||||
memcpy(&txBufferNG.data, data, len);
|
memcpy(&txBufferNG.data, data, len);
|
||||||
|
|
||||||
if ((g_conn.send_via_fpc_usart && g_conn.send_with_crc_on_fpc) || ((!g_conn.send_via_fpc_usart) && g_conn.send_with_crc_on_usb)) {
|
if ((g_conn.send_via_fpc_usart && g_conn.send_with_crc_on_fpc) || ((!g_conn.send_via_fpc_usart) && g_conn.send_with_crc_on_usb)) {
|
||||||
uint8_t first, second;
|
uint8_t first = 0, second = 0;
|
||||||
compute_crc(CRC_14443_A, (uint8_t *)&txBufferNG, sizeof(PacketCommandNGPreamble) + len, &first, &second);
|
compute_crc(CRC_14443_A, (uint8_t *)&txBufferNG, sizeof(PacketCommandNGPreamble) + len, &first, &second);
|
||||||
tx_post->crc = (first << 8) + second;
|
tx_post->crc = (first << 8) + second;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -173,7 +173,7 @@ uint32_t ul_ev1_pwdgenD(const uint8_t *uid) {
|
||||||
|
|
||||||
// AIR purifier Xiaomi
|
// AIR purifier Xiaomi
|
||||||
uint32_t ul_ev1_pwdgenE(const uint8_t *uid) {
|
uint32_t ul_ev1_pwdgenE(const uint8_t *uid) {
|
||||||
uint8_t hash[20];
|
uint8_t hash[20] = {0};
|
||||||
mbedtls_sha1(uid, 7, hash);
|
mbedtls_sha1(uid, 7, hash);
|
||||||
uint32_t pwd = 0;
|
uint32_t pwd = 0;
|
||||||
pwd |= (hash[ hash[0] % 20 ]) << 24 ;
|
pwd |= (hash[ hash[0] % 20 ]) << 24 ;
|
||||||
|
@ -185,7 +185,7 @@ uint32_t ul_ev1_pwdgenE(const uint8_t *uid) {
|
||||||
|
|
||||||
// NDEF tools format password generator
|
// NDEF tools format password generator
|
||||||
uint32_t ul_ev1_pwdgenF(const uint8_t *uid) {
|
uint32_t ul_ev1_pwdgenF(const uint8_t *uid) {
|
||||||
uint8_t hash[16];
|
uint8_t hash[16] = {0};;
|
||||||
mbedtls_md5(uid, 7, hash);
|
mbedtls_md5(uid, 7, hash);
|
||||||
uint32_t pwd = 0;
|
uint32_t pwd = 0;
|
||||||
pwd |= hash[0] << 24;
|
pwd |= hash[0] << 24;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue