]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4351] Fix an integer overflow in cfg_iface_unittest.cc
authorAndrei Pavel <andrei@isc.org>
Thu, 19 Feb 2026 13:08:05 +0000 (15:08 +0200)
committerAndrei Pavel <andrei@isc.org>
Fri, 20 Feb 2026 09:42:34 +0000 (11:42 +0200)
src/lib/dhcpsrv/tests/cfg_iface_unittest.cc

index b133b005190f32f363b4738d855e38031fd0b2cd..8e23434de0f8c5b13919bd40063b6d761bcb0318 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-2026 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -657,7 +657,7 @@ TEST_F(CfgIfaceTest, retryOpenServiceSockets4) {
 
     // Set the callback to count calls and check wait time
     size_t total_calls = 0;
-    auto last_call_time = std::chrono::system_clock::time_point::min();
+    std::chrono::system_clock::time_point last_call_time;  // epoch zero
 
     auto open_callback = [this, &total_calls, &last_call_time, WAIT_TIME, exp_calls](uint16_t) {
         auto now = std::chrono::system_clock::now();
@@ -741,7 +741,7 @@ TEST_F(CfgIfaceTest, retryOpenServiceSockets4OmitBound) {
 
     // Set the callback to count calls and check wait time
     size_t total_calls = 0;
-    auto last_call_time = std::chrono::system_clock::time_point::min();
+    std::chrono::system_clock::time_point last_call_time;  // epoch zero
 
     auto open_callback = [this, &total_calls, &last_call_time, WAIT_TIME, exp_calls](uint16_t) {
         auto now = std::chrono::system_clock::now();
@@ -832,7 +832,7 @@ TEST_F(CfgIfaceTest, retryOpenServiceSockets4OmitNewInterfaces) {
 
     // Set the callback to count calls and check wait time
     size_t total_calls = 0;
-    auto last_call_time = std::chrono::system_clock::time_point::min();
+    std::chrono::system_clock::time_point last_call_time;  // epoch zero
 
     bool ready = false;
 
@@ -1003,7 +1003,7 @@ TEST_F(CfgIfaceTest, retryOpenServiceSockets6) {
 
     // Set the callback to count calls and check wait time
     size_t total_calls = 0;
-    auto last_call_time = std::chrono::system_clock::time_point::min();
+    std::chrono::system_clock::time_point last_call_time;  // epoch zero
 
     auto open_callback = [this, &total_calls, &last_call_time, WAIT_TIME, exp_calls](uint16_t) {
         auto now = std::chrono::system_clock::now();
@@ -1092,7 +1092,7 @@ TEST_F(CfgIfaceTest, retryOpenServiceSockets6OmitBound) {
 
     // Set the callback to count calls and check wait time
     size_t total_calls = 0;
-    auto last_call_time = std::chrono::system_clock::time_point::min();
+    std::chrono::system_clock::time_point last_call_time;  // epoch zero
 
     auto open_callback = [this, &total_calls, &last_call_time, WAIT_TIME, exp_calls](uint16_t) {
         auto now = std::chrono::system_clock::now();
@@ -1196,7 +1196,7 @@ TEST_F(CfgIfaceTest, retryOpenServiceSockets6OmitNewInterfaces) {
 
     // Set the callback to count calls and check wait time
     size_t total_calls = 0;
-    auto last_call_time = std::chrono::system_clock::time_point::min();
+    std::chrono::system_clock::time_point last_call_time;  // epoch zero
 
     bool ready = false;