mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
fix: hf mfu ndef - ul ev1 48 bytes with a NDEF otp. e1101200, max size mismatch. Now it will select smallest
This commit is contained in:
parent
3a2723ac63
commit
214bb46e9c
1 changed files with 14 additions and 1 deletions
|
@ -2782,6 +2782,19 @@ static int CmdHF14MfuNDEF(const char *Cmd) {
|
||||||
maxsize = ndef_get_maxsize(data + 12);
|
maxsize = ndef_get_maxsize(data + 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// iceman: maybe always take MIN of tag identified size vs NDEF reported size?
|
||||||
|
// fix: UL_EV1 48bytes != NDEF reported size
|
||||||
|
for (uint8_t i = 0; i < ARRAYLEN(UL_TYPES_ARRAY); i++) {
|
||||||
|
if (tagtype & UL_TYPES_ARRAY[i]) {
|
||||||
|
|
||||||
|
if (maxsize != (UL_MEMORY_ARRAY[i] * 4) ) {
|
||||||
|
PrintAndLogEx(INFO, "Tag reported size vs NDEF reported size mismatch. Using smallest value");
|
||||||
|
}
|
||||||
|
maxsize = MIN(maxsize, (UL_MEMORY_ARRAY[i] * 4));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// allocate mem
|
// allocate mem
|
||||||
uint8_t *records = calloc(maxsize, sizeof(uint8_t));
|
uint8_t *records = calloc(maxsize, sizeof(uint8_t));
|
||||||
if (records == NULL) {
|
if (records == NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue