[2/2] ws2_32: Fail when select is called with an invalid fd.

Mike Kaplinskiy mike.kaplinskiy at gmail.com
Mon Sep 13 21:22:15 CDT 2010


On Sun, Sep 12, 2010 at 5:23 PM, Vincent Povirk <vincent at codeweavers.com> wrote:
>
>
>
>
>
>

> @@ -3193,6 +3193,10 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds,
>          return SOCKET_ERROR;
>      }
>
> +    for (i=0; i<count; i++)
> +        if (pollfds[i].fd == -1)
> +            return SOCKET_ERROR;
You're leaking pollfds here. (As a nitpick - braces for for's that
contain more than one line are nice)

Mike.



More information about the wine-devel mailing list