From 995d782bb0a7ceb5e915660319bdbe22ce2419b7 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 13 May 2019 23:15:07 +0200 Subject: [PATCH] CMD_READER_HITAG requires always a hitag_data struct used as SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, NULL, 0); sent to ReaderHitag((hitag_function)packet->oldarg[0], (hitag_data *)packet->data.asBytes); void ReaderHitag(hitag_function htf, hitag_data *htd) => we should always send a hitag_data struct --- client/cmdlfhitag.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/cmdlfhitag.c b/client/cmdlfhitag.c index ea9539453..a22c43c1b 100644 --- a/client/cmdlfhitag.c +++ b/client/cmdlfhitag.c @@ -455,9 +455,10 @@ static void printHitagConfiguration(uint8_t config) { } static bool getHitagUid(uint32_t *uid) { - + hitag_data htd; + memset(&htd, 0, sizeof(htd)); clearCommandBuffer(); - SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, NULL, 0); + SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, &htd, sizeof(htd)); PacketResponseNG resp; if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) { PrintAndLogEx(WARNING, "timeout while waiting for reply.");