]> git.meshlink.io Git - catta/commitdiff
* Limit the number of loops in consume_labels() (Closes: #84)
authorTrent Lloyd <lathiat@bur.st>
Sat, 16 Dec 2006 14:27:49 +0000 (14:27 +0000)
committerTrent Lloyd <lathiat@bur.st>
Sat, 16 Dec 2006 14:27:49 +0000 (14:27 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1340 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/dns.c

index c545c00ea33c19f4301974a3debc7b32d52a9bac..fec55e4ca8e902a738e9587e9d1450e742c70f6c 100644 (file)
@@ -332,9 +332,10 @@ static int consume_labels(AvahiDnsPacket *p, unsigned idx, char *ret_name, size_
     int ret = 0;
     int compressed = 0;
     int first_label = 1;
+    int i;
     assert(p && ret_name && l);
     
-    for (;;) {
+    for (i = 0; i < 127; i++) {
         uint8_t n;
 
         if (idx+1 > p->size)