0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Problem: inside the event array, epoll return an event with invalid data pointer which create a segmentation fault

Tests to prevent segmentation fault due to null pointer are added.
This commit is contained in:
patrick-volante 2021-12-03 11:58:20 +01:00
parent 1d3633742a
commit 2c415b6f68

View File

@ -192,6 +192,10 @@ void zmq::epoll_t::loop ()
const poll_entry_t *const pe =
static_cast<const poll_entry_t *> (ev_buf[i].data.ptr);
if (NULL == pe)
continue;
if (NULL == pe->events)
continue;
if (pe->fd == retired_fd)
continue;
if (ev_buf[i].events & (EPOLLERR | EPOLLHUP))