From d633340a1a49b62fc9abfcb34b3cadff516821ee Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 1 Apr 2020 09:26:39 +0200 Subject: [PATCH] Chg: 'data ndef' - cleaner output if called with no hex --- client/cmddata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/cmddata.c b/client/cmddata.c index cf6d9b2e6..74c33da55 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -2309,8 +2309,9 @@ static int CmdDataNDEF(const char *Cmd) { int datalen = 0; uint8_t data[MAX_NDEF_LEN] = {0}; CLIGetHexWithReturn(1, data, &datalen); - CLIParserFree(); + if (datalen == 0) + return PM3_EINVARG; PrintAndLogEx(INFO, "Parsed NDEF Records"); return NDEFRecordsDecodeAndPrint(data, datalen);