summaryrefslogtreecommitdiff
path: root/src/dnsstub/dns_txt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dnsstub/dns_txt.c')
-rw-r--r--src/dnsstub/dns_txt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dnsstub/dns_txt.c b/src/dnsstub/dns_txt.c
index ce0afc4..8368a05 100644
--- a/src/dnsstub/dns_txt.c
+++ b/src/dnsstub/dns_txt.c
@@ -29,7 +29,7 @@ int dns_txt_packet(stralloc *out, const char *buf, unsigned int len)
pos = dns_packet_copy(buf, len, pos, header, 10);
if (!pos) return DNS_ERR;
uint16_unpack_big(header + 8, &datalen);
- if (byte_equal(header, 2, DNS_T_TXT))
+ if (byte_equal(header, 2, DNS_T_TXT)) {
if (byte_equal(header + 2, 2, DNS_C_IN)) {
if (pos + datalen > len) return DNS_ERR;
txtlen = (unsigned char)buf[pos];
@@ -44,6 +44,7 @@ int dns_txt_packet(stralloc *out, const char *buf, unsigned int len)
}
}
}
+ }
pos += datalen;
++ranswers;
if (numanswers)