]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3068] switch bigints to the checked variant
authorAndrei Pavel <andrei@isc.org>
Mon, 2 Oct 2023 11:34:35 +0000 (14:34 +0300)
committerAndrei Pavel <andrei@isc.org>
Thu, 5 Oct 2023 14:40:02 +0000 (17:40 +0300)
Kea needs to gain knowledge of big integers overflowing and underflowing
in various places in code such as when deserializing integers where it's
important to know if the recipient can hold the value, and if the value
is accurately represented.

src/lib/util/bigints.h

index be76b1d482324469fc6e557ef71a08f00f99f664..065a2bc831935fb1bbe98535551926c7f17a0515 100644 (file)
@@ -16,9 +16,9 @@
 namespace isc {
 namespace util {
 
-using int128_t = boost::multiprecision::int128_t;
+using int128_t = boost::multiprecision::checked_int128_t;
 
-using uint128_t = boost::multiprecision::uint128_t;
+using uint128_t = boost::multiprecision::checked_uint128_t;
 
 }  // namespace util
 }  // namespace isc