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
182ec0a5
Commit
182ec0a5
authored
Nov 05, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsock32: Check return value rather than returned size for error.
parent
2593ee87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
socket.c
dlls/wsock32/socket.c
+9
-15
No files found.
dlls/wsock32/socket.c
View file @
182ec0a5
...
...
@@ -441,11 +441,9 @@ DWORD WINAPI WsControl(DWORD protocol,
if
(
!
pcbResponseInfoLen
)
return
ERROR_BAD_ENVIRONMENT
;
GetIpForwardTable
(
NULL
,
&
routeTableSize
,
FALSE
);
if
(
!
routeTableSize
)
{
*
pcbResponseInfoLen
=
0
;
return
WSCTL_SUCCESS
;
}
ret
=
GetIpForwardTable
(
NULL
,
&
routeTableSize
,
FALSE
);
if
(
ret
!=
ERROR_INSUFFICIENT_BUFFER
)
return
ret
;
numRoutes
=
(
routeTableSize
-
sizeof
(
MIB_IPFORWARDTABLE
))
/
sizeof
(
MIB_IPFORWARDROW
)
+
1
;
if
(
*
pcbResponseInfoLen
<
sizeof
(
IPRouteEntry
)
*
numRoutes
)
...
...
@@ -494,11 +492,9 @@ DWORD WINAPI WsControl(DWORD protocol,
if
(
!
pcbResponseInfoLen
)
return
ERROR_BAD_ENVIRONMENT
;
GetIpNetTable
(
NULL
,
&
arpTableSize
,
FALSE
);
if
(
!
arpTableSize
)
{
*
pcbResponseInfoLen
=
0
;
return
WSCTL_SUCCESS
;
}
ret
=
GetIpNetTable
(
NULL
,
&
arpTableSize
,
FALSE
);
if
(
ret
!=
ERROR_INSUFFICIENT_BUFFER
)
return
ret
;
numEntries
=
(
arpTableSize
-
sizeof
(
MIB_IPNETTABLE
))
/
sizeof
(
MIB_IPNETROW
)
+
1
;
if
(
*
pcbResponseInfoLen
<
sizeof
(
MIB_IPNETROW
)
*
numEntries
)
...
...
@@ -536,11 +532,9 @@ DWORD WINAPI WsControl(DWORD protocol,
if
(
!
pcbResponseInfoLen
)
return
ERROR_BAD_ENVIRONMENT
;
GetTcpTable
(
NULL
,
&
tcpTableSize
,
FALSE
);
if
(
!
tcpTableSize
)
{
*
pcbResponseInfoLen
=
0
;
return
WSCTL_SUCCESS
;
}
ret
=
GetTcpTable
(
NULL
,
&
tcpTableSize
,
FALSE
);
if
(
ret
!=
ERROR_INSUFFICIENT_BUFFER
)
return
ret
;
numEntries
=
(
tcpTableSize
-
sizeof
(
MIB_TCPTABLE
))
/
sizeof
(
MIB_TCPROW
)
+
1
;
if
(
*
pcbResponseInfoLen
<
sizeof
(
MIB_TCPROW
)
*
numEntries
)
...
...
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