Commit ee2e5c02 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

ws2_32: Disallow NULL in socket lookups.

NULL means an unused slot, not a valid socket. Signed-off-by: 's avatarAkihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ffe20add
......@@ -379,6 +379,8 @@ static BOOL socket_list_find( SOCKET socket )
{
unsigned int i;
if (!socket) return FALSE;
EnterCriticalSection( &cs_socket_list );
for (i = 0; i < socket_list_size; ++i)
{
......@@ -397,6 +399,8 @@ static BOOL socket_list_remove( SOCKET socket )
{
unsigned int i;
if (!socket) return FALSE;
EnterCriticalSection(&cs_socket_list);
for (i = 0; i < socket_list_size; ++i)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment