diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index 7ff381d22..47ab3a997 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -607,7 +607,7 @@ static int ndef_print_CC(uint8_t *data) { uint8_t mbread = (data[3] & 0x01); PrintAndLogEx(SUCCESS, " %02X: Additional feature information", data[3]); - PrintAndLogEx(SUCCESS, " 00000000"); + PrintAndLogEx(SUCCESS, " %s", sprint_bin(&data[3], 1)); PrintAndLogEx(SUCCESS, " xxx..... - %02X: RFU ( %s )", msb3, (msb3 == 0) ? _GREEN_("ok") : _RED_("fail")); PrintAndLogEx(SUCCESS, " ...x.... - %02X: %s special frame", sf, (sf) ? "support" : "don\'t support"); PrintAndLogEx(SUCCESS, " ....x... - %02X: %s lock block", lb, (lb) ? "support" : "don\'t support"); diff --git a/client/src/cmdhftopaz.c b/client/src/cmdhftopaz.c index 6d7a1975d..805d891d8 100644 --- a/client/src/cmdhftopaz.c +++ b/client/src/cmdhftopaz.c @@ -391,7 +391,7 @@ static int topaz_print_CC(uint8_t *data) { PrintAndLogEx(SUCCESS, " %02X: Additional feature information", data[3]); PrintAndLogEx(SUCCESS, " ^^"); - PrintAndLogEx(SUCCESS, " 00000000"); + PrintAndLogEx(SUCCESS, " %s", sprint_bin(&data[3], 1)); PrintAndLogEx(SUCCESS, " xxx..... - %02X: RFU ( %s )", msb3, (msb3 == 0) ? _GREEN_("ok") : _RED_("fail")); PrintAndLogEx(SUCCESS, " ...x.... - %02X: %s special frame", sf, (sf) ? "support" : "don\'t support"); PrintAndLogEx(SUCCESS, " ....x... - %02X: %s lock block", lb, (lb) ? "support" : "don\'t support"); diff --git a/client/src/util.c b/client/src/util.c index 57e213feb..e849ebb62 100644 --- a/client/src/util.c +++ b/client/src/util.c @@ -404,6 +404,8 @@ char *sprint_bytebits_bin_break(const uint8_t *data, const size_t len, const uin // 3072 + end of line characters if broken at 8 bits static char buf[MAX_BIN_BREAK_LENGTH] = {0}; + memset(buf, 0, sizeof(buf)); + char *tmp = buf; // loop through the out_index to make sure we don't go too far