From 66b1a4853679e2499886349c76dd65d95544cc83 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 23 Feb 2025 21:16:34 +0100 Subject: [PATCH] style --- client/src/cmdhf14a.c | 9 +++++---- client/src/cmdhfseos.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index bb551687e..30b45c68c 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -1300,18 +1300,18 @@ int ExchangeAPDU14a(const uint8_t *datain, int datainlen, bool activateField, bo *dataoutlen = 0; res = CmdExchangeAPDU(chainBlockNotLast, &datain[clen], vlen, vActivateField, dataout, maxdataoutlen, dataoutlen, &chaining); if (res != PM3_SUCCESS) { - if (leaveSignalON == false) + if (leaveSignalON == false) { DropField(); - + } return 200; } // check R-block ACK // TODO check this one... if ((*dataoutlen == 0) && (chaining != chainBlockNotLast)) { - if (leaveSignalON == false) + if (leaveSignalON == false) { DropField(); - + } return 201; } @@ -1323,6 +1323,7 @@ int ExchangeAPDU14a(const uint8_t *datain, int datainlen, bool activateField, bo } break; } + } while (clen < datainlen); } else { diff --git a/client/src/cmdhfseos.c b/client/src/cmdhfseos.c index d97e708da..72c9e129e 100644 --- a/client/src/cmdhfseos.c +++ b/client/src/cmdhfseos.c @@ -842,7 +842,7 @@ static int seos_mutual_auth(uint8_t *randomICC, uint8_t *CRYPTOGRAM_Diversifier, bool activate_field = false; bool keep_field_on = true; - uint8_t aMUTUAL_AUTH[102]; + uint8_t aMUTUAL_AUTH[102] = {0}; int aMUTUAL_AUTH_n = 0; param_gethex_to_eol(mutual_auth, 0, aMUTUAL_AUTH, sizeof(aMUTUAL_AUTH), &aMUTUAL_AUTH_n); int res = ExchangeAPDU14a(aMUTUAL_AUTH, aMUTUAL_AUTH_n, activate_field, keep_field_on, response, sizeof(response), &resplen);