mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-19 21:03:23 -07:00
fix rare bug in tlv.c
This commit is contained in:
parent
7afa751a96
commit
844c34303e
1 changed files with 6 additions and 0 deletions
|
@ -352,7 +352,13 @@ struct tlvdb *tlvdb_find_path(struct tlvdb *tlvdb, tlv_tag_t tag[]) {
|
||||||
|
|
||||||
void tlvdb_add(struct tlvdb *tlvdb, struct tlvdb *other)
|
void tlvdb_add(struct tlvdb *tlvdb, struct tlvdb *other)
|
||||||
{
|
{
|
||||||
|
if (tlvdb == other)
|
||||||
|
return;
|
||||||
|
|
||||||
while (tlvdb->next) {
|
while (tlvdb->next) {
|
||||||
|
if (tlvdb->next == other)
|
||||||
|
return;
|
||||||
|
|
||||||
tlvdb = tlvdb->next;
|
tlvdb = tlvdb->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue