From: Tomek Mrugalski Date: Fri, 13 Nov 2015 11:00:36 +0000 (+0100) Subject: [3682] Segfault fix in handling hosts with DUIDs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=739f6a769f140ef91fb1546fb2a8fa4aa753f61e;p=thirdparty%2Fkea.git [3682] Segfault fix in handling hosts with DUIDs --- 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