Permalink
Browse files

Limit the maximum length of a qname

  • Loading branch information...
1 parent 64425b9 commit bccd0688170425790b5aa7545265c3bfa0000df6 @pieterlexis pieterlexis committed Jun 2, 2015
Showing with 2 additions and 0 deletions.
  1. +2 −0 pdns/dnsparser.cc
View
@@ -493,6 +493,8 @@ void PacketReader::getLabelFromContent(const vector<uint8_t>& content, uint16_t&
}
ret.append(1,'.');
}
+ if (ret.length() > 1024)
+ throw MOADNSException("Total name too long");
}
}

0 comments on commit bccd068

Please sign in to comment.