[PATCH 3/6] ws2_32: Fix parameters checking in WSADuplicateSocket
Alexandre Julliard
julliard at winehq.org
Mon Sep 9 04:39:22 CDT 2013
Bruno Jesus <00cpxxx at gmail.com> writes:
> + fd = get_sock_fd( s, FILE_READ_DATA, NULL );
> + if (fd == -1)
> + {
> + SetLastError(WSAENOTSOCK);
> + return SOCKET_ERROR;
> + }
> + release_sock_fd( s, fd );
You should avoid retrieving the fd if you are not using it. The handle
should be checked at the point where you are doing something with it.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list