mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
earlier test
This commit is contained in:
parent
c155b62111
commit
a086754279
1 changed files with 8 additions and 7 deletions
|
@ -658,6 +658,14 @@ static int CmdLegicWrbl(const char *Cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OUT-OF-BOUNDS checks
|
||||||
|
// UID 4+1 bytes can't be written to.
|
||||||
|
if (offset < 5) {
|
||||||
|
PrintAndLogEx(WARNING, "Out-of-bounds, bytes 0-1-2-3-4 can't be written to. Offset = %d", offset);
|
||||||
|
return PM3_EOUTOFBOUND;
|
||||||
|
}
|
||||||
|
|
||||||
//Validations
|
//Validations
|
||||||
if (errors || cmdp == 0) {
|
if (errors || cmdp == 0) {
|
||||||
if (data)
|
if (data)
|
||||||
|
@ -674,13 +682,6 @@ static int CmdLegicWrbl(const char *Cmd) {
|
||||||
|
|
||||||
legic_print_type(card.cardsize, 0);
|
legic_print_type(card.cardsize, 0);
|
||||||
|
|
||||||
// OUT-OF-BOUNDS checks
|
|
||||||
// UID 4+1 bytes can't be written to.
|
|
||||||
if (offset < 5) {
|
|
||||||
PrintAndLogEx(WARNING, "Out-of-bounds, bytes 0-1-2-3-4 can't be written to. Offset = %d", offset);
|
|
||||||
return PM3_EOUTOFBOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (len + offset > card.cardsize) {
|
if (len + offset > card.cardsize) {
|
||||||
PrintAndLogEx(WARNING, "Out-of-bounds, Cardsize = %d, [offset+len = %d ]", card.cardsize, len + offset);
|
PrintAndLogEx(WARNING, "Out-of-bounds, Cardsize = %d, [offset+len = %d ]", card.cardsize, len + offset);
|
||||||
return PM3_EOUTOFBOUND;
|
return PM3_EOUTOFBOUND;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue