]> git.meshlink.io Git - catta/commitdiff
* avahi-core/dns.c: Use a '#define AVAHI_DNS_LABELS_MAX 127' instead of the hard...
authorTrent Lloyd <lathiat@bur.st>
Sat, 16 Dec 2006 15:00:11 +0000 (15:00 +0000)
committerTrent Lloyd <lathiat@bur.st>
Sat, 16 Dec 2006 15:00:11 +0000 (15:00 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1341 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/dns.c
avahi-core/dns.h

index fec55e4ca8e902a738e9587e9d1450e742c70f6c..a3ec0e6274f004e92e67b200b4847e1f23bbff48 100644 (file)
@@ -335,7 +335,7 @@ static int consume_labels(AvahiDnsPacket *p, unsigned idx, char *ret_name, size_
     int i;
     assert(p && ret_name && l);
     
-    for (i = 0; i < 127; i++) {
+    for (i = 0; i < AVAHI_DNS_LABELS_MAX; i++) {
         uint8_t n;
 
         if (idx+1 > p->size)
index 4696e00d66cb46d56c692b76f291404cff24528e..d1c06a5b37f1793a9f8ab4f87a39c4575e5edf0b 100644 (file)
@@ -28,6 +28,7 @@
 #define AVAHI_DNS_PACKET_SIZE_MAX 9000
 #define AVAHI_DNS_PACKET_HEADER_SIZE 12
 #define AVAHI_DNS_PACKET_EXTRA_SIZE 48
+#define AVAHI_DNS_LABELS_MAX 127
 
 typedef struct AvahiDnsPacket {
     size_t size, rindex, max_size;