mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 01:36:52 +08:00
fix binary string printing. Making sure no left over data is in static array
This commit is contained in:
parent
62980b5038
commit
003623e5a7
3 changed files with 4 additions and 2 deletions
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue