Permalink
Browse files

Limit the maximum length of a qname

  • Loading branch information...
1 parent 10ecb48 commit 6cf71cf4d7b55a780c8bb8f35cb22c4be585757e @pieterlexis pieterlexis committed Jun 2, 2015
Showing with 2 additions and 0 deletions.
  1. +2 −0 pdns/dnsparser.cc
View
@@ -494,6 +494,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 6cf71cf

Please sign in to comment.