mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 15:05:16 +00:00
[#3785] Extra fixes for Fedora
This commit is contained in:
@@ -290,7 +290,7 @@ public:
|
|||||||
if (cumulative_ > 2) {
|
if (cumulative_ > 2) {
|
||||||
uint16_t dns_length = readUint16(receive_buffer_,
|
uint16_t dns_length = readUint16(receive_buffer_,
|
||||||
sizeof(receive_buffer_));
|
sizeof(receive_buffer_));
|
||||||
complete = ((dns_length + 2) == cumulative_);
|
complete = ((static_cast<size_t>(dns_length) + 2) == cumulative_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!complete) {
|
if (!complete) {
|
||||||
|
@@ -211,7 +211,7 @@ OptionDataTypeUtil::readTuple(const std::vector<uint8_t>& buf,
|
|||||||
<< buf.size());
|
<< buf.size());
|
||||||
}
|
}
|
||||||
uint8_t len = buf[0];
|
uint8_t len = buf[0];
|
||||||
if (buf.size() < 1 + len) {
|
if (buf.size() < 1 + static_cast<size_t>(len)) {
|
||||||
isc_throw(BadDataTypeCast, "unable to read data from the buffer as"
|
isc_throw(BadDataTypeCast, "unable to read data from the buffer as"
|
||||||
<< " tuple (length " << static_cast<unsigned>(len)
|
<< " tuple (length " << static_cast<unsigned>(len)
|
||||||
<< "). Invalid buffer size: " << buf.size());
|
<< "). Invalid buffer size: " << buf.size());
|
||||||
@@ -227,7 +227,7 @@ OptionDataTypeUtil::readTuple(const std::vector<uint8_t>& buf,
|
|||||||
<< buf.size());
|
<< buf.size());
|
||||||
}
|
}
|
||||||
uint16_t len = isc::util::readUint16(&buf[0], 2);
|
uint16_t len = isc::util::readUint16(&buf[0], 2);
|
||||||
if (buf.size() < 2 + len) {
|
if (buf.size() < 2 + static_cast<size_t>(len)) {
|
||||||
isc_throw(BadDataTypeCast, "unable to read data from the buffer as"
|
isc_throw(BadDataTypeCast, "unable to read data from the buffer as"
|
||||||
<< " tuple (length " << len
|
<< " tuple (length " << len
|
||||||
<< "). Invalid buffer size: " << buf.size());
|
<< "). Invalid buffer size: " << buf.size());
|
||||||
|
@@ -239,7 +239,7 @@ bufferToCharString(isc::util::InputBuffer& buffer, size_t rdata_len,
|
|||||||
"insufficient data to read character-string length");
|
"insufficient data to read character-string length");
|
||||||
}
|
}
|
||||||
const uint8_t len = buffer.readUint8();
|
const uint8_t len = buffer.readUint8();
|
||||||
if (rdata_len < len + 1) {
|
if (rdata_len < static_cast<size_t>(len) + 1) {
|
||||||
isc_throw(isc::dns::DNSMessageFORMERR,
|
isc_throw(isc::dns::DNSMessageFORMERR,
|
||||||
"character string length is too large: " <<
|
"character string length is too large: " <<
|
||||||
static_cast<int>(len));
|
static_cast<int>(len));
|
||||||
|
@@ -134,7 +134,7 @@ LabelSequence::serialize(void* buf, size_t buf_len) const {
|
|||||||
bp += ndata_len;
|
bp += ndata_len;
|
||||||
|
|
||||||
isc_throw_assert(bp - reinterpret_cast<const uint8_t*>(buf) ==
|
isc_throw_assert(bp - reinterpret_cast<const uint8_t*>(buf) ==
|
||||||
static_cast<const ssize_t>(expected_size));
|
static_cast<ssize_t>(expected_size));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@@ -73,8 +73,8 @@ TEST_F(DNSSECTimeTest, fromText) {
|
|||||||
|
|
||||||
// On the other hand, the 64-bit version should return monotonically
|
// On the other hand, the 64-bit version should return monotonically
|
||||||
// increasing counters.
|
// increasing counters.
|
||||||
EXPECT_EQ(4294967296LL, timeFromText64("21060207062816"));
|
EXPECT_EQ(4294967296LLU, timeFromText64("21060207062816"));
|
||||||
EXPECT_EQ(4294967306LL, timeFromText64("21060207062826"));
|
EXPECT_EQ(4294967306LLU, timeFromText64("21060207062826"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// This helper templated function tells timeToText32 a faked current time.
|
// This helper templated function tells timeToText32 a faked current time.
|
||||||
|
@@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
const uint8_t len = buffer.readUint8();
|
const uint8_t len = buffer.readUint8();
|
||||||
if (rdata_len < len + 1) {
|
if (rdata_len < static_cast<size_t>(len) + 1) {
|
||||||
isc_throw(DNSMessageFORMERR, "Error in parsing " <<
|
isc_throw(DNSMessageFORMERR, "Error in parsing " <<
|
||||||
RRType(typeCode) <<
|
RRType(typeCode) <<
|
||||||
" RDATA: character string length is too large: " <<
|
" RDATA: character string length is too large: " <<
|
||||||
|
Reference in New Issue
Block a user