diff --git a/client/emv/tlv.c b/client/emv/tlv.c index 31b5ea360..a309d0659 100644 --- a/client/emv/tlv.c +++ b/client/emv/tlv.c @@ -352,6 +352,9 @@ struct tlvdb *tlvdb_find_path(struct tlvdb *tlvdb, tlv_tag_t tag[]) { void tlvdb_add(struct tlvdb *tlvdb, struct tlvdb *other) { + if (tlvdb == other) + return; + while (tlvdb->next) { if (tlvdb->next == other) return;