]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2498] Cleanups; mostly include files
authorJelte Jansen <jelte@isc.org>
Thu, 10 Jan 2013 11:11:23 +0000 (12:11 +0100)
committerJelte Jansen <jelte@isc.org>
Thu, 10 Jan 2013 11:37:27 +0000 (12:37 +0100)
src/lib/dns/rdata/generic/hinfo_13.cc
src/lib/dns/rdata/generic/naptr_35.cc

index 9f678dd9ad1b54566f9fb10282fd77e2b483e170..f205497b84faa3a6554c63ea9b6b386a88d40819 100644 (file)
 
 #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;
 
index 4d891e6a6cf851c88de6e4f47307e482891d7cf1..352b887381824d2142ad6247b7935af5c555d6c8 100644 (file)
@@ -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 ");
         }