From 7f42bc91871dce3db802e4b37fa465a09dd35cb7 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Tue, 12 Sep 2017 11:13:36 +0200 Subject: [PATCH] make sure we actually have parts --- pdns/dnsrecords.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 1c3c1f79fd..3b3d569c15 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -52,6 +52,8 @@ string DNSResourceRecord::getZoneRepresentation(bool noDot) const { case QType::SRV: case QType::MX: stringtok(parts, content); + if (!parts.size()) + return ""; last = *parts.rbegin(); ret << content; if (last == ".") -- 2.47.2