mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 05:29:43 +01:00
Problem: Use of pipe_t after free in zmq::socket_base_t::term_endpoint(). Issue #3245.
Solution: When pipe_t is freed (terminated) remove it from _endpoints member of zmq::socket_base_t. Resolves issue #3245.
This commit is contained in:
@@ -141,6 +141,9 @@ class pipe_t : public object_t,
|
||||
// Returns true if HWM is not reached
|
||||
bool check_hwm () const;
|
||||
|
||||
void set_endpoint_uri (const char *name_);
|
||||
std::string &get_endpoint_uri ();
|
||||
|
||||
private:
|
||||
// Type of the underlying lock-free pipe.
|
||||
typedef ypipe_base_t<msg_t> upipe_t;
|
||||
@@ -244,6 +247,10 @@ class pipe_t : public object_t,
|
||||
|
||||
const bool _conflate;
|
||||
|
||||
// If the pipe belongs to socket's endpoint the endpoint's name is stored here.
|
||||
// Otherwise this is empty.
|
||||
std::string _endpoint_uri;
|
||||
|
||||
// Disable copying.
|
||||
pipe_t (const pipe_t &);
|
||||
const pipe_t &operator= (const pipe_t &);
|
||||
|
||||
Reference in New Issue
Block a user