chiark / gitweb /
resolved: fix multi-record packets with TXTs
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 31 Jul 2014 14:44:11 +0000 (10:44 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 31 Jul 2014 14:45:24 +0000 (10:45 -0400)
src/resolve/resolved-dns-packet.c

index fae105d..32c4876 100644 (file)
@@ -968,7 +968,7 @@ int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, size_t *start) {
         case DNS_TYPE_TXT: {
                 char *s;
 
-                while (p->rindex < p->size) {
+                while (p->rindex < offset + rdlength) {
                         r = dns_packet_read_string(p, &s, NULL);
                         if (r < 0)
                                 goto fail;