]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4483] fixed mysql host data source memory corruption
authorRazvan Becheriu <razvan@isc.org>
Sat, 16 May 2026 12:22:55 +0000 (15:22 +0300)
committerRazvan Becheriu <razvan@isc.org>
Fri, 22 May 2026 13:15:04 +0000 (13:15 +0000)
src/hooks/dhcp/mysql/mysql_host_data_source.cc
src/hooks/dhcp/pgsql/pgsql_host_data_source.cc

index 77113cdef4effce69acd359728f7cbf99f6577f0..30367e0ea0cc681bf726c759bfcc9a30be369e74 100644 (file)
@@ -1760,7 +1760,7 @@ public:
         columns_[5] = "excluded_prefix";
         columns_[6] = "excluded_prefix_len";
 
-        static_assert(6 < RESRV_COLUMNS, "6 < RESRV_COLUMNS");
+        static_assert(7 < RESRV_COLUMNS, "7 < RESRV_COLUMNS");
     }
 
     /// @brief Create MYSQL_BIND objects for IPv6 Reservation.
@@ -1895,7 +1895,7 @@ private:
     uint8_t type_;
 
     /// @brief IAID.
-    uint8_t iaid_;
+    uint32_t iaid_;
 
     /// @brief Object holding reservation being sent to the database.
     IPv6Resrv resv_;
@@ -1944,7 +1944,7 @@ public:
           subnet_id_(SUBNET_ID_UNUSED),
           host_id_(0), option_() {
 
-        static_assert(11 <= OPTION_COLUMNS, "11 <= OPTION_COLUMNS");
+        static_assert(10 < OPTION_COLUMNS, "10 < OPTION_COLUMNS");
     }
 
     /// @brief Creates binding array to insert option data into database.
index 88933e95e641a6f25549813cb190cdbfdf33f3f6..836aee9269dcdb64e03c83777a433230e6e24b56 100644 (file)
@@ -1267,7 +1267,7 @@ public:
         columns_[DHCP_SUBNET_ID_COL] = "dhcp_subnet_id";
         columns_[HOST_ID_COL] = "host_id";
 
-        static_assert(11 <= OPTION_COLUMNS, "11 <= OPTION_COLUMNS");
+        static_assert(10 < OPTION_COLUMNS, "10 < OPTION_COLUMNS");
     }
 
     /// @brief Creates binding array to insert option data into database.