]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
fix rare bug in tlv.c (#788)
authorOleg Moiseenko <807634+merlokk@users.noreply.github.com>
Wed, 20 Feb 2019 17:35:39 +0000 (19:35 +0200)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Wed, 20 Feb 2019 17:35:39 +0000 (18:35 +0100)
client/emv/tlv.c

index 9722c9311ec9cd485daab3527c7e9b245781b12b..05de928ebc03c56dc4604f8945b653019acd22dc 100644 (file)
@@ -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;
        }
 
Impressum, Datenschutz