Unverified Commit c52ca3c2 authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #2897 from sigiesec/fix-2895

Problem: add_fd might be called with fd_ == retired_fd
parents 4518e0cc 7488be61
...@@ -57,6 +57,8 @@ zmq::poll_t::~poll_t () ...@@ -57,6 +57,8 @@ zmq::poll_t::~poll_t ()
zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_) zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_)
{ {
zmq_assert (fd_ != retired_fd);
// If the file descriptor table is too small expand it. // If the file descriptor table is too small expand it.
fd_table_t::size_type sz = fd_table.size (); fd_table_t::size_type sz = fd_table.size ();
if (sz <= (fd_table_t::size_type) fd_) { if (sz <= (fd_table_t::size_type) fd_) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment