Permalink
Browse files

Limit the maximum length of a qname

  • Loading branch information...
1 parent 7f9283a commit 92f7b2bb3f1e18a1f99b482347072dc8e46a2b40 @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 92f7b2b

Please sign in to comment.