From f12a4bfdd1630fefaf67da5a298923b36dd50b79 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 23 Jan 2020 18:59:54 -0800 Subject: [PATCH] ircd::rfc1035: Throw on invalid SRV target string during answer parse. --- ircd/rfc1035.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ircd/rfc1035.cc b/ircd/rfc1035.cc index d23545514..7496369b0 100644 --- a/ircd/rfc1035.cc +++ b/ircd/rfc1035.cc @@ -372,6 +372,7 @@ ircd::rfc1035::record::SRV::SRV(const answer &answer) tgt = string_view{this->tgtbuf, len - 1}; pos += len; + valid_name(tgt); // throws assert(std::distance(pos, end(rdata)) >= 0); }