mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
Safe check in sprint_bytebits_bin_break
This commit is contained in:
parent
0d7f93a8e7
commit
fdba7c2ff8
1 changed files with 6 additions and 2 deletions
|
@ -313,10 +313,14 @@ char *sprint_bytebits_bin_break(const uint8_t *data, const size_t len, const uin
|
|||
|
||||
char c = data[i];
|
||||
// manchester wrong bit marker
|
||||
if (c == 7)
|
||||
if (c == 7) {
|
||||
c = '.';
|
||||
else
|
||||
} else if (c < 2) {
|
||||
c += '0';
|
||||
} else {
|
||||
PrintAndLogEx(ERR, "Invalid data passed to sprint_bytebits_bin_break()");
|
||||
return buf;
|
||||
}
|
||||
|
||||
*(tmp++) = c;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue