mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix: ndef parse uri off by one
This commit is contained in:
parent
67e3ac3f54
commit
f4b75d7f5b
1 changed files with 6 additions and 2 deletions
|
@ -225,7 +225,12 @@ static int ndefDecodePayload(NDEFHeader_t *ndef) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncmp((char *)ndef->Type, "U", ndef->TypeLen)) {
|
if (!strncmp((char *)ndef->Type, "U", ndef->TypeLen)) {
|
||||||
PrintAndLogEx(NORMAL, "\turi : %s%.*s", (ndef->Payload[0] <= 0x23 ? URI_s[ndef->Payload[0]] : "[err]"), ndef->PayloadLen, &ndef->Payload[1]);
|
PrintAndLogEx(NORMAL
|
||||||
|
, "\turi : %s%.*s"
|
||||||
|
, (ndef->Payload[0] <= 0x23 ? URI_s[ndef->Payload[0]] : "[err]")
|
||||||
|
, ndef->PayloadLen-1
|
||||||
|
, &ndef->Payload[1]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncmp((char *)ndef->Type, "Sig", ndef->TypeLen)) {
|
if (!strncmp((char *)ndef->Type, "Sig", ndef->TypeLen)) {
|
||||||
|
@ -353,6 +358,5 @@ int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue