[PATCH] ws2_32: Fixed select() number of fds (Coverity)

Marcus Meissner marcus at jet.franken.de
Thu Jun 16 06:58:12 CDT 2011


Hi,

Coverity spotted this indirectly as we dont check the return code.
CID 5137.

Not sure if this case ever triggered, or if we got woken up by
signals making select return instead.

Ciao, Marcus
---
 dlls/ws2_32/tests/sock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index de9c400..29c97e2 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -2958,7 +2958,7 @@ static DWORD WINAPI drain_socket_thread(LPVOID arg)
                 fd_set readset;
                 FD_ZERO(&readset);
                 FD_SET(sock, &readset);
-                select(0, &readset, NULL, NULL, NULL);
+                select(sock+1, &readset, NULL, NULL, NULL);
                 while (drain_pause)
                     Sleep(100);
             }
-- 
1.7.3.4




More information about the wine-patches mailing list