ws2_32: Disallow NULL in socket lookups.
NULL means an unused slot, not a valid socket. Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ffe20add58
commit
ee2e5c0242
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue