mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01: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:
parent
1d3633742a
commit
2c415b6f68
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user