Fix ubsan false positive:

* Avoid calling stream() on partially constructed object.

Fixes #1495, fix #1496
This commit is contained in:
Eelis van der Weegen
2019-03-03 22:25:48 +01:00
committed by Vinnie Falco
parent 62878255fb
commit 9992701a4a

View File

@@ -130,8 +130,8 @@ struct stream<NextLayer, deflateSupported>::impl_type
boost::empty_init_t{}, boost::empty_init_t{},
std::forward<Args>(args)...) std::forward<Args>(args)...)
, detail::service::impl_type( , detail::service::impl_type(
this->stream().get_executor().context()) this->boost::empty_value<NextLayer>::get().get_executor().context())
, timer(this->stream().get_executor()) , timer(this->boost::empty_value<NextLayer>::get().get_executor())
{ {
timeout_opt.handshake_timeout = none(); timeout_opt.handshake_timeout = none();
timeout_opt.idle_timeout = none(); timeout_opt.idle_timeout = none();