ACK, -AVM
On 11/9/2016 9:27 PM, Anders Widell wrote: > osaf/libs/core/mds/mds_dt_tipc.c | 2 +- > osaf/libs/core/mds/mds_dt_trans.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > > The result from poll() was incorrectly stored in an unsigned integer, which > means that if poll() returns -1 we would interpret the result as a very large > number. Subsequently, we read the possibly undefined values of pollfd.revents, > and may perform a blocking read. > > diff --git a/osaf/libs/core/mds/mds_dt_tipc.c > b/osaf/libs/core/mds/mds_dt_tipc.c > --- a/osaf/libs/core/mds/mds_dt_tipc.c > +++ b/osaf/libs/core/mds/mds_dt_tipc.c > @@ -659,7 +659,7 @@ static uint32_t mdtm_process_recv_events > */ > > while (1) { > - unsigned int pollres; > + int pollres; > struct pollfd pfd[3]; > struct tipc_event event; > > diff --git a/osaf/libs/core/mds/mds_dt_trans.c > b/osaf/libs/core/mds/mds_dt_trans.c > --- a/osaf/libs/core/mds/mds_dt_trans.c > +++ b/osaf/libs/core/mds/mds_dt_trans.c > @@ -781,7 +781,7 @@ uint32_t mdtm_process_recv_events_tcp(vo > if discovery events are received , process the discovery events > */ > while (1) { > - unsigned int pollres; > + int pollres; > > pfd[0].events = POLLIN; > pfd[1].events = POLLIN; ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel