diff --git a/CHANGELOG.md b/CHANGELOG.md index 11c5f9c0d..cb3ae7670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Change `reveng -g` - now correctly take 1024 hexstring as input (@iceman1001) - Added `--override` parameter to NDEF read for overriding MAD CRC check (@iceman1001) - Added `hf saflok` commands (@stiebeljoshua) - Added `ntag_clean.lua` script for easier NTAG memory wipe (@trigat) diff --git a/client/src/cmdcrc.c b/client/src/cmdcrc.c index 66b826dd5..62ec1acfe 100644 --- a/client/src/cmdcrc.c +++ b/client/src/cmdcrc.c @@ -451,9 +451,11 @@ static int CmdrevengSearch(const char *Cmd) { #define NMODELS 106 - char inHexStr[256] = {0x00}; + char inHexStr[1024] = {0}; int dataLen = param_getstr(Cmd, 0, inHexStr, sizeof(inHexStr)); - if (dataLen < 4) return 0; + if (dataLen < 4) { + return 0; + } // these two arrays, must match preset size. char *Models[NMODELS]; @@ -463,14 +465,15 @@ static int CmdrevengSearch(const char *Cmd) { char result[50 + 1] = {0}; char revResult[50 + 1] = {0}; int ans = GetModels(Models, &count, width); - bool found = false; - if (!ans) { + if (ans == 0) { for (int i = 0; i < count; i++) { free(Models[i]); } return 0; } + bool found = false; + str_lower(inHexStr); // try each model and get result @@ -576,7 +579,7 @@ static int CmdrevengSearch(const char *Cmd) { } int CmdCrc(const char *Cmd) { - char c[100 + 7]; + char c[1024 + 7]; snprintf(c, sizeof(c), "reveng "); snprintf(c + strlen(c), sizeof(c) - strlen(c), Cmd, strlen(Cmd)); diff --git a/client/src/mifare/mad.c b/client/src/mifare/mad.c index 2a5b72703..664a722d1 100644 --- a/client/src/mifare/mad.c +++ b/client/src/mifare/mad.c @@ -235,7 +235,7 @@ int MADCheck(uint8_t *sector0, uint8_t *sector16, bool verbose, bool *haveMAD2) if (verbose && !res2) { PrintAndLogEx(SUCCESS, "CRC8...... 0x%02X ( %s )", sector16[0], _GREEN_("ok")); - } + } } // MA (multi-application card)