From b82857f8922110be83ea9b6a80d2dd373ff3cc82 Mon Sep 17 00:00:00 2001 From: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:05:15 +0300 Subject: [PATCH] Compilation workaround May be reverted if fails Signed-off-by: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com> --- client/src/cmdhflist.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index aacbb4085..ccedc5c66 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -1339,8 +1339,7 @@ void annotateMfPlus(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) { snprintf(exp, strlen(stringdata)+1, stringdata, uKeyNum); break; case 0x4000: - stringdata = "FIRST AUTH (Keynr 0x%04X: %c sector %d)"; - snprintf(exp, strlen(stringdata)+1, stringdata, uKeyNum, uKeyNum & 0x0001 ? 'B' : 'A', (uKeyNum - 0x4000) / 2); + snprintf(exp, size, "FIRST AUTH (Keynr 0x%04X: %c sector %d)", uKeyNum, uKeyNum & 0x0001 ? 'B' : 'A', (uKeyNum - 0x4000) / 2); break; case 0xA000: // There are virtual card encryption and MACing keys, but this is NOT their place! stringdata = "FIRST AUTH(Keynr 0x%04X: Proximity Check Key)"; @@ -1438,8 +1437,7 @@ void annotateMfPlus(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) { snprintf(exp, size, stringdata, encrypted, uBlockNum, responseMaced); break; case 0x4000: - stringdata = "WRITE (Keynr 0x%04X: %c sector %d)"; - snprintf(exp, strlen(stringdata)+1, stringdata, uBlockNum, uBlockNum & 0x0001 ? 'B' : 'A', (uBlockNum - 0x4000) / 2); + snprintf(exp, size, "WRITE (Keynr 0x%04X: %c sector %d)", uBlockNum, uBlockNum & 0x0001 ? 'B' : 'A', (uBlockNum - 0x4000) / 2); break; case 0xA000: // There are virtual card encryption and MACing keys, but this is NOT their place! stringdata = "WRITE(Keynr 0x%04X: Proximity Check Key)";