mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 06:51:22 +00:00
[MSAFD]
- Gracefully handle lpcbBytesReturned == NULL condition in WSPIoctl. Fixes crash in ws2_32:sock svn path=/trunk/; revision=56782
This commit is contained in:
parent
bbb72145fa
commit
f59ea8fb2f
1 changed files with 6 additions and 0 deletions
|
@ -1968,6 +1968,12 @@ WSPIoctl(IN SOCKET Handle,
|
||||||
BOOLEAN NeedsCompletion;
|
BOOLEAN NeedsCompletion;
|
||||||
BOOLEAN NonBlocking;
|
BOOLEAN NonBlocking;
|
||||||
|
|
||||||
|
if (!lpcbBytesReturned)
|
||||||
|
{
|
||||||
|
*lpErrno = WSAEFAULT;
|
||||||
|
return SOCKET_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get the Socket Structure associate to this Socket*/
|
/* Get the Socket Structure associate to this Socket*/
|
||||||
Socket = GetSocketStructure(Handle);
|
Socket = GetSocketStructure(Handle);
|
||||||
if (!Socket)
|
if (!Socket)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue