]> granicus.if.org Git - pdns/commitdiff
refuse to validate empty space - @zaphodb, this may be your crash
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 19 Feb 2016 20:56:33 +0000 (21:56 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 19 Feb 2016 20:56:33 +0000 (21:56 +0100)
pdns/validate-recursor.cc

index 2012ed62033a972ad3102d9567f2e73fe867e212..af3f18b0671abe6468ad8ffc0fedb9eaa6f8aff6 100644 (file)
@@ -25,6 +25,9 @@ public:
 
 vState validateRecords(const vector<DNSRecord>& recs)
 {
+  if(recs.empty())
+    return Insecure; // can't secure nothing 
+
   cspmap_t cspmap=harvestCSPFromRecs(recs);
   //  cerr<<"Got "<<cspmap.size()<<" RRSETs: ";
   int numsigs=0;