From: Oleg Moiseenko <807634+merlokk@users.noreply.github.com> Date: Wed, 20 Feb 2019 17:35:39 +0000 (+0200) Subject: fix rare bug in tlv.c (#788) X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/7527c2bdd821ac194ed362f327b5e6b7aef7d1bb fix rare bug in tlv.c (#788) --- diff --git a/client/emv/tlv.c b/client/emv/tlv.c index 9722c931..05de928e 100644 --- a/client/emv/tlv.c +++ b/client/emv/tlv.c @@ -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) { + if (tlvdb == other) + return; + while (tlvdb->next) { + if (tlvdb->next == other) + return; + tlvdb = tlvdb->next; }