mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
CHG: tvl tag length adapted
This commit is contained in:
parent
6743e45386
commit
8f18a9abf2
1 changed files with 2 additions and 2 deletions
|
@ -372,13 +372,13 @@ bool ParamLoadFromJson(struct tlvdb *tlv) {
|
|||
size_t buflen = 0;
|
||||
|
||||
// here max length must be 4, but now tlv_tag_t is 2-byte var. so let it be 2 by now... TODO: needs refactoring tlv_tag_t...
|
||||
if (!HexToBuffer("TLV Error type:", tlvTag, buf, 2, &buflen)) {
|
||||
if (!HexToBuffer("TLV Error type:", tlvTag, buf, 4, &buflen)) {
|
||||
json_decref(root);
|
||||
return false;
|
||||
}
|
||||
tlv_tag_t tag = 0;
|
||||
for (int i = 0; i < buflen; i++) {
|
||||
tag = (tag << 8) + buf[i];
|
||||
tag = (tag << 8) | buf[i];
|
||||
}
|
||||
|
||||
if (!HexToBuffer("TLV Error value:", tlvValue, buf, sizeof(buf) - 1, &buflen)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue