[1/3] ws2_32: Fix uninitialized memory access in do_poll (Coverity).
Nikolay Sivov
nsivov at codeweavers.com
Sun Jun 7 06:53:17 CDT 2015
On 30.05.2015 18:20, Sebastian Lackner wrote:
> ---
> dlls/ws2_32/socket.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I guess it fixes a warning, but timeout == 0 means no timeout and you
don't need a timestamp.
select() is the only user of it, and it has this:
---
if (ws_timeout)
timeout = (ws_timeout->tv_sec * 1000) + (ws_timeout->tv_usec +
999) / 1000;
ret = do_poll(pollfds, count, timeout);
---
so probably 0 value should be handled differently within a loop, or need
to have a separate case that call poll() once and return right away.
More information about the wine-devel
mailing list