From: Peter van Dijk Date: Tue, 12 Sep 2017 09:13:36 +0000 (+0200) Subject: make sure we actually have parts X-Git-Tag: rec-4.1.0-rc1~45^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5684%2Fhead;p=thirdparty%2Fpdns.git make sure we actually have parts --- 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 == ".")