From 5d681ba9762bf829a7951a6d6a57597a7d5da2bc Mon Sep 17 00:00:00 2001 From: Baptiste Assmann Date: Thu, 15 Oct 2015 15:23:28 +0200 Subject: [PATCH] BUG/MINOR: dns: parsing error of some DNS response The function which parses a DNS response buffer did not move properly a pointer when reading a packet where records does not use DNS "message compression" techniques. Thanks to 0yvind Johnsen for the help provided during the troubleshooting session. --- src/dns.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dns.c b/src/dns.c index fee5f5fc2..7f71ac7e9 100644 --- a/src/dns.c +++ b/src/dns.c @@ -504,6 +504,8 @@ int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, char * return DNS_RESP_INVALID; if (memcmp(ptr, dn_name, dn_name_len) != 0) return DNS_RESP_WRONG_NAME; + + reader += (dn_name_len + 1); } else { reader += (len + 1);