#include <exceptions/exceptions.h>
#include <dns/exceptions.h>
-#include <dns/name.h>
-#include <dns/messagerenderer.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdata/generic/detail/char_string.h>
-#include <util/strutil.h>
-
-#include <string>
-
-#include <boost/lexical_cast.hpp>
+#include <util/buffer.h>
using namespace std;
-using boost::lexical_cast;
using namespace isc::util;
using namespace isc::dns;
NAPTRImpl() : replacement(".") {}
NAPTRImpl(InputBuffer& buffer, size_t rdata_len) : replacement(".") {
- if (rdata_len < 4 || buffer.getLength() < 4) {
+ if (rdata_len < 4 || buffer.getLength() - buffer.getPosition() < 4) {
isc_throw(isc::dns::DNSMessageFORMERR, "Error in parsing "
"NAPTR RDATA wire format: insufficient length ");
}