Merge pull request #2897 from sigiesec/fix-2895

Problem: add_fd might be called with fd_ == retired_fd
This commit is contained in:
Luca Boccassi 2018-01-26 10:08:50 +00:00 committed by GitHub
commit c52ca3c284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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_assert (fd_ != retired_fd);
// If the file descriptor table is too small expand it.
fd_table_t::size_type sz = fd_table.size ();
if (sz <= (fd_table_t::size_type) fd_) {