Commit 924221ee authored by Jelte Jansen's avatar Jelte Jansen

[2498] Cleanups; mostly include files

parent 7a8402a5
......@@ -16,19 +16,12 @@
#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;
......
......@@ -37,7 +37,7 @@ public:
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 ");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment