mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
catch first scenario when auth_table_len == AUTH_TABLE_LEN
This commit is contained in:
+2
-2
@@ -286,7 +286,7 @@ static void hitag2_handle_reader_command(uint8_t *rx, const size_t rxlen, uint8_
|
||||
// Received RWD authentication challenge and response
|
||||
case 64: {
|
||||
// Store the authentication attempt
|
||||
if (auth_table_len < (AUTH_TABLE_LENGTH - 8)) {
|
||||
if (auth_table_len + 8 <= AUTH_TABLE_LENGTH) {
|
||||
memcpy(auth_table + auth_table_len, rx, 8);
|
||||
auth_table_len += 8;
|
||||
}
|
||||
@@ -1371,7 +1371,7 @@ void SniffHitag2(bool ledcontrol) {
|
||||
// Check if we recognize a valid authentication attempt
|
||||
if (rxlen == 64) {
|
||||
// Store the authentication attempt
|
||||
if (auth_table_len < (AUTH_TABLE_LENGTH - 8)) {
|
||||
if (auth_table_len + 8 <= AUTH_TABLE_LENGTH) {
|
||||
memcpy(auth_table + auth_table_len, rx, 8);
|
||||
auth_table_len += 8;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user