From 107f33937f886063633101a00bb481555b9e7233 Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Sun, 22 Jan 2023 23:48:14 +0100 Subject: [PATCH] SystemSan: log correct dns type and class (#9476) by skipping final null byte of domain name --- infra/experimental/SystemSan/inspect_dns.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/infra/experimental/SystemSan/inspect_dns.cpp b/infra/experimental/SystemSan/inspect_dns.cpp index 8f08e3a3f..030446345 100644 --- a/infra/experimental/SystemSan/inspect_dns.cpp +++ b/infra/experimental/SystemSan/inspect_dns.cpp @@ -108,6 +108,7 @@ struct DnsRequest parse_dns_request(std::vector data, size_t offset) while(offset < data.size()) { uint8_t rlen = uint8_t(data[offset]); if (rlen == 0) { + offset++; break; } r.nb_levels++;