diff --git a/client/cmdhffido.c b/client/cmdhffido.c index faff8e82c..bcac719ae 100644 --- a/client/cmdhffido.c +++ b/client/cmdhffido.c @@ -140,10 +140,15 @@ int CmdHFFidoInfo(const char *cmd) { return 0; } + + if(buf[0]) { + PrintAndLog("FIDO2 ger version error: %d", buf[0]); + return 0; + } PrintAndLog("FIDO2 version: (%d)", len); dump_buffer((const unsigned char *)buf, len, NULL, 0); - TinyCborPrintFIDOPackage(buf, len); + TinyCborPrintFIDOPackage(&buf[1], len - 1); return 0; } diff --git a/client/fido/cbortools.c b/client/fido/cbortools.c index dbd02a3d1..19f9abc2f 100644 --- a/client/fido/cbortools.c +++ b/client/fido/cbortools.c @@ -190,7 +190,7 @@ int TinyCborInit(uint8_t *data, size_t length, CborValue *cb) { int TinyCborPrintFIDOPackage(uint8_t *data, size_t length) { CborValue cb; int res; - res = TinyCborInit(&data[1], length - 1, &cb); + res = TinyCborInit(data, length, &cb); if (res) return res;