]> git.meshlink.io Git - catta/blobdiff - avahi-core/dns.c
annoy people with some default wide-area domains
[catta] / avahi-core / dns.c
index 63ea8a0e4d65c14e38d4d67803e774dc90a4bf6a..66b0bdf8c01e1bfdd57c74823181855bb9af9e7e 100644 (file)
 #include <config.h>
 #endif
 
-#include <netinet/in.h>
-
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <assert.h>
 
+#include <netinet/in.h>
+
+#include <avahi-common/defs.h>
 #include <avahi-common/domain.h>
 #include <avahi-common/malloc.h>
 
@@ -544,7 +545,8 @@ static int parse_rdata(AvahiDnsPacket *p, AvahiRecord *r, uint16_t rdlength) {
         case AVAHI_DNS_TYPE_TXT:
 
             if (rdlength > 0) {
-                r->data.txt.string_list = avahi_string_list_parse(avahi_dns_packet_get_rptr(p), rdlength);
+                if (avahi_string_list_parse(avahi_dns_packet_get_rptr(p), rdlength, &r->data.txt.string_list) < 0)
+                    return -1;
                 
                 if (avahi_dns_packet_skip(p, rdlength) < 0)
                     return -1;