From 739f6a769f140ef91fb1546fb2a8fa4aa753f61e Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 13 Nov 2015 12:00:36 +0100 Subject: [PATCH] [3682] Segfault fix in handling hosts with DUIDs --- src/lib/dhcpsrv/mysql_host_data_source.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/dhcpsrv/mysql_host_data_source.cc b/src/lib/dhcpsrv/mysql_host_data_source.cc index 906bb4a112..dba704c6c2 100644 --- a/src/lib/dhcpsrv/mysql_host_data_source.cc +++ b/src/lib/dhcpsrv/mysql_host_data_source.cc @@ -230,7 +230,7 @@ public: dhcp_identifier_length_ = host_->getDuid()->getDuid().size(); bind_[1].buffer_type = MYSQL_TYPE_BLOB; bind_[1].buffer = reinterpret_cast - (host_->getDuid()->getDuid()[0]); + (const_cast(&(host_->getDuid()->getDuid()[0]))); bind_[1].buffer_length = dhcp_identifier_length_; bind_[1].length = &dhcp_identifier_length_; // bind_[1].is_null = &MLM_FALSE; // commented out for performance -- 2.47.2