Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
85abf9cb
Commit
85abf9cb
authored
Aug 30, 2003
by
Juan Lang
Committed by
Alexandre Julliard
Aug 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- improve some parameter checking in WSAIoctl
- fix a memory leak I introduced in WSAIoctl
parent
549e2478
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
socket.c
dlls/winsock/socket.c
+27
-2
No files found.
dlls/winsock/socket.c
View file @
85abf9cb
...
...
@@ -1968,7 +1968,19 @@ INT WINAPI WSAIoctl (SOCKET s,
DWORD
size
,
numInt
,
apiReturn
;
TRACE
(
"-> SIO_GET_INTERFACE_LIST request
\n
"
);
/* FIXME: length of output buffer not checked */
if
(
!
lpbOutBuffer
)
{
close
(
fd
);
WSASetLastError
(
WSAEFAULT
);
return
SOCKET_ERROR
;
}
if
(
!
lpcbBytesReturned
)
{
close
(
fd
);
WSASetLastError
(
WSAEFAULT
);
return
SOCKET_ERROR
;
}
apiReturn
=
GetAdaptersInfo
(
NULL
,
&
size
);
if
(
apiReturn
==
ERROR_NO_DATA
)
...
...
@@ -1985,6 +1997,13 @@ INT WINAPI WSAIoctl (SOCKET s,
{
PIP_ADAPTER_INFO
ptr
;
if
(
size
>
cbOutBuffer
)
{
HeapFree
(
GetProcessHeap
(),
0
,
table
);
close
(
fd
);
WSASetLastError
(
WSAEFAULT
);
return
(
SOCKET_ERROR
);
}
for
(
ptr
=
table
,
numInt
=
0
;
ptr
;
ptr
=
ptr
->
Next
,
intArray
++
,
numInt
++
)
{
...
...
@@ -2035,7 +2054,6 @@ INT WINAPI WSAIoctl (SOCKET s,
intArray
->
iiBroadcastAddress
.
AddressIn
.
sin_addr
.
WS_s_addr
=
bcast
;
}
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
else
{
...
...
@@ -2045,6 +2063,7 @@ INT WINAPI WSAIoctl (SOCKET s,
WSASetLastError
(
WSAEINVAL
);
return
(
SOCKET_ERROR
);
}
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
else
{
...
...
@@ -2416,6 +2435,12 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
goto
error
;
}
if
(
!
lpNumberOfBytesSent
)
{
err
=
WSAEFAULT
;
goto
error
;
}
iovec
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwBufferCount
*
sizeof
(
struct
iovec
)
);
if
(
!
iovec
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment