Permalink
Browse files

Limit the maximum length of a qname

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

Please sign in to comment.